https://github.com/brianmichel/twofy
The missing 2FA helper for macOS
https://github.com/brianmichel/twofy
2fa macos swift swiftui two-factor-authentication
Last synced: about 2 months ago
JSON representation
The missing 2FA helper for macOS
- Host: GitHub
- URL: https://github.com/brianmichel/twofy
- Owner: brianmichel
- Created: 2024-06-27T01:41:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-22T18:26:03.000Z (almost 2 years ago)
- Last Synced: 2026-02-27T18:38:42.126Z (4 months ago)
- Topics: 2fa, macos, swift, swiftui, two-factor-authentication
- Language: Swift
- Homepage: https://twofy.xyz
- Size: 7.78 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Twofy
An application and suite of browser extensions to relay incoming 2FA text messages into the non-Safari browser of your choice.
## Design Goals
I want an app that can apply the principle of least privilege to a set of functionality that means giving access to my entire Message.app database which contains all of my messages. This means that Twofy:
- Is sandboxed
- Does not allow incoming or outgoing network traffic
- Requires the user to grant access to the `~/Library/Messages` directory
- (Coming Soon) is notarized
- (Coming Soon) isolates un-sandboxable behavior to different XPC services
## Architecture
```mermaid
sequenceDiagram
box Green Sandboxed
participant App
participant App-BrowserSupport (NativeMessageHost)
end
box Red Not Sandboxed
participant App-ManifestInstaller (XPC)
end
box Blue Browser
participant Web Page
participant Browser Extension
end
App-->>App-ManifestInstaller (XPC): Install NativeMessageHost registrations (If Needed)
App-ManifestInstaller (XPC)-->>File System: Copy Files
App-ManifestInstaller (XPC)-->>App: Registrations installed
Web Page-->>Browser Extension: Land on page with 2FA input field
Browser Extension-->>App-BrowserSupport (NativeMessageHost): Waiting For 2FA
App-BrowserSupport (NativeMessageHost)-->>App: Start Polling For Messages
App-->>App-BrowserSupport (NativeMessageHost): Found Code '1234'
App-BrowserSupport (NativeMessageHost)-->>Browser Extension: Received Code '1234'
Browser Extension-->>Web Page: Show '1234' in UI below input field
```