import React, { useState } from 'react'; import { useSettingsStore } from '../store/useSettingsStore'; import { invokeCommand as invoke } from '../ipc'; import { KeyRound, ShieldAlert } from 'lucide-react'; export const KeychainPermissionModal: React.FC = () => { const showKeychainModal = useSettingsStore(state => state.showKeychainModal); const setShowKeychainModal = useSettingsStore(state => state.setShowKeychainModal); const [isGranting, setIsGranting] = useState(false); const [error, setError] = useState(null); if (!showKeychainModal) { return null; } const handleGrant = async () => { setIsGranting(true); setError(null); try { const result = await invoke('grant_keychain_access'); if (result.persistent) { useSettingsStore.setState({ keychainAccessGranted: true }); await useSettingsStore.getState().hydratePairingToken(); setShowKeychainModal(false); } else { setError(result.error || 'Failed to grant keychain access.'); } } catch (e: any) { setError(e.toString()); } finally { setIsGranting(false); } }; const handleLater = () => { setShowKeychainModal(false); }; return (
e.stopPropagation()} >

Credential Storage Access Needed

Firelink uses the browser extension to seamlessly capture downloads. To securely store the pairing token that connects the app and the extension, we need access to this system's credential store.

Note: Firelink only requests access to its own dedicated credential entry. It cannot and will not access other saved passwords or credential items on your system.

{error && (
{error}
)}
Hint: If you select Later, the extension will only work for this session. You can grant access anytime from Settings > Integrations.
); };