A modern, open-source two-factor authentication (TOTP) app built with Flutter. Securely manage your 2FA codes with cloud synchronization, session management, and a polished Material 3 UI.
This is the official mobile client for the Gilos Auth Server.
- TOTP Management — Add, edit, and delete TOTP tokens via QR code scanning or manual entry
- Cloud Sync — Securely synchronize your TOTPs across devices via the Gilos Auth backend
- Session Management — View and terminate active sessions from any device
- Account Management — Full profile editing including avatar, username, contacts, and security settings
- OAuth2 + PKCE — Secure authentication using the Authorization Code flow with Proof Key for Code Exchange
- Offline-First — Works without internet; changes sync automatically when connectivity returns
- Dark & Light Themes — Beautiful Material 3 design with automatic system theme detection
- Multi-Factor Auth — Support for email, phone, and TOTP-based MFA on your Gilos account
lib/
├── main.dart # App entry point & routing
├── app.dart # App constants & configuration
├── themes.dart # Light & dark Material 3 themes
├── spacing.dart # Spacing constants
├── model/
│ ├── backend/
│ │ ├── authentication/ # OAuth, session, auth state
│ │ ├── request/ # HTTP request/response layer
│ │ ├── synchronization/ # Push/pull sync engine
│ │ └── user_sessions/ # Session management
│ ├── database/ # SQLite database (sqflite)
│ ├── settings/ # Preferences (theme, etc.)
│ └── totp/ # TOTP model, generation, repository
├── pages/ # UI screens
│ ├── auth/ # Login page
│ ├── home/ # Main page with TOTPs & sessions tabs
│ ├── account/ # Account/profile management
│ └── settings/ # App settings
├── widgets/ # Reusable UI components
└── utils/ # Utilities (result types, platform, etc.)
Key Design Decisions:
- Riverpod for state management with
AsyncNotifierpattern - Sealed classes for type-safe request/response/result handling
- SQLite (sqflite) for local TOTP & sync queue persistence
- FlutterSecureStorage for tokens and sensitive data
- Exponential backoff with jitter for sync retries
- Flutter (SDK ^3.10.8)
- A running Gilos Auth backend instance (or use the public one)
-
Clone the repository
git clone https://github.com/gilosorg/authenticator.git cd authenticator -
Configure environment
cp .env.example .env
Edit
.envwith your backend URL and OAuth credentials. By default, the app connects to the public Gilos Auth instance:BACKEND_URL=https://auth.gilos.org OAUTH_CLIENT_ID=1 OAUTH_REDIRECT_URI=gilos://auth -
Install dependencies
flutter pub get
-
Run the app
flutter run
# Android
flutter build apk --release
# iOS
flutter build ios --releaseThe app supports two deep link schemes:
| Scheme | Purpose | Example |
|---|---|---|
otpauth:// |
Adding TOTPs via QR code | otpauth://totp/Example:user@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Example |
gilos:// |
OAuth callbacks | gilos://auth?code=...&state=... |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0.
The Gilos name and logos are trademarks of CHERRY SOFTWARES LLC. Please see our Trademark Policy for guidelines on how to properly use and distribute this software without infringing on our brand.
See SECURITY.md for vulnerability reporting and security design details.