A secure, open-source Two-Factor Authentication (2FA) app built with React Native and Expo. Generate TOTP codes for your accounts and sync them across devices using the Oxy platform.
- 📱 QR Code Scanning: Easily add 2FA accounts by scanning QR codes
- 🔒 TOTP Code Generation: Generate time-based one-time passwords (TOTP) for your accounts
- ☁️ Cloud Sync: Sync your accounts across devices using Oxy cloud services
- 🌙 Dark/Light Theme: Toggle between light and dark modes
- 🌍 Internationalization: Support for multiple languages (English, Spanish)
- 📱 Cross-Platform: Runs on iOS, Android, and Web
- 🔐 Secure Storage: Local storage with encryption support
- Node.js (v18 or later)
- npm or yarn
- Expo CLI (
npm install -g @expo/cli) - For mobile development:
- iOS: Xcode (macOS only)
- Android: Android Studio
-
Clone the repository
git clone https://github.com/OxyHQ/Authenticator.git cd Authenticator -
Install dependencies
npm install
-
Start the development server
npm start
-
Run on specific platforms
# iOS (requires macOS and Xcode) npm run ios # Android (requires Android Studio) npm run android # Web npm run web
-
Lint the code
npm run lint
-
Environment Setup
- The app uses Expo's development build system
- Camera permissions are required for QR code scanning
- Internet access is required for cloud sync features
- Open the app and you'll see the main screen with no accounts
- Tap "Add Account" or navigate to the "Scan" tab
- Grant camera permission when prompted
- Scan a QR code from your service provider (Google, GitHub, etc.)
- View your code on the main screen - it updates every 30 seconds
- Main Screen: All your accounts are listed with their current TOTP codes
- Auto-refresh: Codes automatically update every 30 seconds
- Tap to copy: Tap any code to copy it to your clipboard
- Navigate to Settings > "Sync Accounts"
- Sign in to Oxy using your credentials
- Upload to Cloud: Sync your local accounts to the cloud
- Download from Cloud: Retrieve accounts from other devices
- Settings > Toggle between light and dark themes
- Settings > Switch between English and Spanish languages
- Create an Oxy Account: Visit Oxy platform to create an account
- Sign In: Use the "Sync Accounts" feature in settings
- Sync Data: Your accounts will be encrypted and stored securely
The app can be configured through the app.json file:
{
"expo": {
"name": "Authenticator by Oxy",
"slug": "oxy-authenticator",
"version": "1.0.0",
"orientation": "portrait",
"scheme": "myapp",
"userInterfaceStyle": "automatic"
}
}- Camera Permissions: Configured for QR code scanning
- Scheme: Deep linking support with
myapp://scheme - User Interface: Automatic light/dark mode detection
- Orientation: Portrait mode only for optimal mobile experience
The app connects to Oxy services using:
- Base URL:
https://api.oxy.so(configured in_layout.tsx) - Storage Prefix:
oxy_examplefor authentication tokens
Themes are configured in contexts/ThemeContext.tsx:
// Light theme colors
const lightTheme = {
background: '#f8f9fa',
surface: '#ffffff',
text: '#202124',
primary: '#1a73e8',
// ... more colors
}
// Dark theme colors
const darkTheme = {
background: '#1a1a1a',
surface: '#2d2d2d',
text: '#ffffff',
primary: '#8ab4f8',
// ... more colors
}Languages are configured in the i18n/ directory:
en.json: English translationses.json: Spanish translations
To add a new language:
- Create a new JSON file in
i18n/ - Add translations for all keys
- Update the language toggle in
settings.tsx
├── app/ # Main application screens
│ ├── (tabs)/ # Tab-based navigation
│ │ ├── index.tsx # Main authenticator screen
│ │ ├── scan.tsx # QR code scanner
│ │ ├── settings.tsx # App settings
│ │ └── sync.tsx # Cloud sync management
│ └── _layout.tsx # Root layout and providers
├── components/ # Reusable components
│ ├── OTPCode.tsx # TOTP code display component
│ └── SafeAreaHeader.tsx # Header component
├── contexts/ # React contexts
│ └── ThemeContext.tsx # Theme management
├── i18n/ # Internationalization
├── utils/ # Utility functions
│ └── totp.ts # TOTP generation logic
└── assets/ # Static assets
- OTPCode: Displays TOTP codes with auto-refresh
- ThemeProvider: Manages light/dark theme state
- SafeAreaHeader: Consistent header across screens
- Oxy Integration: Cloud sync and authentication
- Local Storage: Accounts stored in AsyncStorage
- TOTP Generation: Time-based codes generated client-side
- Cloud Sync: Optional backup to Oxy platform
- Theme State: Persisted user preferences
Q: Is this app secure? A: Yes, the app stores your secrets locally on your device using AsyncStorage. Cloud sync is optional and uses encrypted storage through the Oxy platform.
Q: Can I use this without creating an Oxy account? A: Absolutely! The app works perfectly as a standalone authenticator. The Oxy account is only needed for cross-device sync.
Q: What 2FA services are supported? A: Any service that provides TOTP QR codes (Google, GitHub, Microsoft, AWS, etc.). The app follows the standard TOTP protocol (RFC 6238).
Q: Can I export my accounts? A: Currently, accounts can be synced to Oxy cloud. Local export features may be added in future versions.
- Check permissions: Ensure camera permissions are granted in device settings
- Restart app: Close and reopen the app
- Web limitation: QR scanning is not available on web - use mobile app instead
- Check internet: Ensure stable internet connection
- Oxy account: Verify you're signed in to your Oxy account
- Server status: Check if Oxy services are operational
- Time sync: Ensure your device time is accurate (TOTP depends on time)
- Secret format: Verify the QR code is a valid TOTP code
- Re-scan: Try scanning the QR code again
- Clear storage: Go to Settings > Clear All Accounts (this will remove all data)
- Restart app: Force close and reopen the application
- Update: Ensure you're running the latest version
- Dependencies: Run
npm installto ensure all dependencies are installed - Cache: Clear Expo cache with
npx expo start --clear - Node version: Ensure you're using Node.js v18 or later
If you encounter issues not covered here:
- Check existing GitHub Issues
- Create a new issue with detailed information
- Include device type, OS version, and error messages
- For security concerns, contact the maintainers privately
We welcome contributions! Please see our Contributing Guidelines for details on how to get started.
This project is open source. Please check the repository for license information.
Built with ❤️ by the Oxy team and contributors.
- Expo: Cross-platform development framework
- React Native: Mobile app development
- Oxy Platform: Cloud sync and authentication services