Top Related Projects
[Unmaintained] Open source two-factor authentication for Android
Source code for 2FAS Android app
A free, secure and open source app for Android to manage your 2-step verification tokens.
Open source fork of the Google Authenticator Android app
Quick Overview
FreeOTP Android is an open-source two-factor authentication (2FA) app for Android devices. It implements the TOTP and HOTP standards, providing secure, time-based and counter-based one-time passwords for enhanced account security.
Pros
- Open-source and free, ensuring transparency and community-driven development
- Supports both TOTP and HOTP standards for broad compatibility
- Simple and user-friendly interface for easy management of 2FA tokens
- Actively maintained with regular updates and bug fixes
Cons
- Limited advanced features compared to some commercial 2FA apps
- No built-in cloud backup or sync functionality
- Requires manual entry of 2FA secrets, which can be prone to errors
- Limited customization options for the app's appearance
Getting Started
To use FreeOTP Android:
- Download and install the app from the Google Play Store or F-Droid.
- Open the app and tap the "+" button to add a new account.
- Scan the QR code provided by the service you're setting up 2FA for, or manually enter the secret key.
- Once added, tap on the account to generate a one-time password.
- Enter the generated code on the service's website or app to complete 2FA setup.
Note: This is not a code library, so code examples and quick start instructions are not applicable.
Competitor Comparisons
[Unmaintained] Open source two-factor authentication for Android
Pros of andOTP
- More feature-rich, including categories, tags, and advanced backup options
- Active development with frequent updates and bug fixes
- Supports custom icons for OTP entries
Cons of andOTP
- Slightly more complex user interface, which may be less intuitive for some users
- Larger app size due to additional features
Code Comparison
FreeOTP Android (Java):
public class Token {
private String issuer;
private String label;
private String image;
private String type;
private String algorithm;
}
andOTP (Kotlin):
data class Entry(
var type: OTPType,
var algorithm: HashAlgorithm,
var issuer: String,
var label: String,
var tags: MutableList<String> = mutableListOf()
)
The code snippets show that andOTP uses Kotlin and includes additional fields like tags, while FreeOTP Android uses Java and has a simpler structure. andOTP's implementation allows for more flexibility and organization of OTP entries.
Both projects are open-source and provide secure two-factor authentication solutions for Android devices. FreeOTP Android offers a simpler, more straightforward approach, while andOTP provides a feature-rich experience with additional customization options. The choice between the two depends on the user's preferences for simplicity versus advanced features.
Source code for 2FAS Android app
Pros of 2fas-android
- More feature-rich, including backup and sync options
- Modern UI design with customizable themes
- Supports a wider range of token types and algorithms
Cons of 2fas-android
- Larger app size and potentially higher resource usage
- More complex codebase, which may lead to longer development cycles
- Requires more permissions, which some users may find concerning
Code Comparison
FreeOTP-Android uses a simpler approach for token generation:
override fun generateOTP(): String {
return TOTP(secret, digits, algorithm).generateOTP()
}
2FAS-Android employs a more complex system with additional features:
fun generateTOTP(secret: String, time: Long, digits: Int, algorithm: HashAlgorithm): String {
val hmac = when (algorithm) {
HashAlgorithm.SHA1 -> HmacSHA1()
HashAlgorithm.SHA256 -> HmacSHA256()
HashAlgorithm.SHA512 -> HmacSHA512()
}
return TOTPGenerator(hmac, digits).generate(secret, time)
}
Both projects are open-source Android authenticator apps, but 2FAS-Android offers more features and customization options at the cost of increased complexity and app size. FreeOTP-Android focuses on simplicity and minimal permissions, making it a lighter-weight option for basic two-factor authentication needs.
A free, secure and open source app for Android to manage your 2-step verification tokens.
Pros of Aegis
- More feature-rich, including categories, icons, and advanced filtering options
- Supports encrypted backups and multiple vaults
- Actively maintained with frequent updates and bug fixes
Cons of Aegis
- Larger app size due to additional features
- Slightly more complex user interface, which may be overwhelming for some users
- Not as widely recognized or adopted as FreeOTP
Code Comparison
FreeOTP-Android (Java):
public class Token {
private String issuer;
private String label;
private String image;
private String type;
private String algorithm;
}
Aegis (Kotlin):
data class VaultEntry(
var uuid: UUID,
var type: OtpInfo,
var name: String,
var issuer: String,
var icon: VaultEntryIcon?,
var group: String?,
var note: String?
)
The code comparison shows that Aegis uses Kotlin and has a more comprehensive data structure for storing token information, including additional fields like UUID, group, and note. FreeOTP-Android uses Java and has a simpler Token class with basic information.
Open source fork of the Google Authenticator Android app
Pros of Google Authenticator
- More widely recognized and trusted brand
- Supports transfer of accounts between devices
- Includes a QR code scanner for easy account setup
Cons of Google Authenticator
- Closed-source, which may raise privacy concerns
- Less frequent updates compared to FreeOTP
- Limited customization options
Code Comparison
FreeOTP Android:
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.action_add -> {
startActivity(Intent(this, AddActivity::class.java))
true
}
else -> super.onOptionsItemSelected(item)
}
}
Google Authenticator:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.add_account:
startActivity(new Intent(this, AddAccountActivity.class));
return true;
default:
return super.onOptionsItemSelected(item);
}
}
Both repositories implement similar functionality for adding new accounts, with FreeOTP using Kotlin and Google Authenticator using Java. The code structure is comparable, with minor syntax differences due to the programming languages used.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
FreeOTP
FreeOTP is a two-factor authentication application for systems utilizing one-time password protocols. Tokens can be added easily by scanning a QR code.
FreeOTP implements open standards:
- HOTP (HMAC-Based One-Time Password Algorithm) RFC 4226
- TOTP (Time-Based One-Time Password Algorithm) RFC 6238
This means that no proprietary server-side component is necessary: use any server-side component that implements these standards.
Download FreeOTP for Android
Contributing
Pull requests on GitHub are welcome under the Apache 2.0 license, see COPYING.
Permissions
The FreeOTP app uses the following permissions
Permission | Usage | Required | Permission type |
---|---|---|---|
Camera | Recognition of QR codes | No | Dangerous |
Internet | Token image provisioning | No | Normal |
Top Related Projects
[Unmaintained] Open source two-factor authentication for Android
Source code for 2FAS Android app
A free, secure and open source app for Android to manage your 2-step verification tokens.
Open source fork of the Google Authenticator Android app
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot