Open source two-factor authentication for Android

andOTP - Android OTP Authenticator

Build Status Current release Crowdin Chat - Telegram Chat - Matrix

andOTP

andOTP is a two-factor authentication App for Android 5.1+.

It implements Time-based One-time Passwords (TOTP) and HMAC-Based One-Time Passwords (HOTP). Simply scan the QR code and login with the generated 6-digit code.

This project started out as a fork of the great OTP Authenticator app written by Bruno Bierbaumer, which has sadly been inactive since 2015. By now almost every aspect of the app has been changed/re-written so the fork status of the Github repository got detached upon user request. But all credit for the original version and for starting this project still goes to Bruno!

Help wanted:

I currently don't have that much time to spend developing andOTP, so any contributions are always welcome. Don't worry, I will still continue to develop andOTP it will just slow down from the incredible speed I had going in the beginning.

Features:

  • Free and Open-Source
  • Requires minimal permissions
    • Camera access for QR code scanning
    • Storage access for import and export of the database
  • Encrypted storage with two backends:
    • Android KeyStore
    • Password / PIN
  • Multiple backup options:
    • Plain-text
    • Password-protected
    • OpenPGP-encrypted
  • Sleek minimalistic Material Design with three different themes:
    • Light
    • Dark
    • Black (for OLED screens)
  • Great Usability
  • Compatible with Google Authenticator
  • Supported algorithms:
    • TOTP (Time-based One-time Passwords) as specified in RFC 6238
    • HOTP (HMAC-based One-time Passwords) as specified in RFC 4226

Backups:

To keep your account information as secure as possible andOTP only stores it in encrypted data files. A part of the encryption key used for that is stored in the Android KeyStore system. The advantage of this approach is that the key is kept separate from the apps data and, as a bonus, can be backed by hardware cryptography (if your device supports this).

However, due to that separation, backups with 3rd-party apps like Titanium Backup can not be used with andOTP. Such apps only backup the encrypted data files and not the encryption key, which renders them useless.

Please only use the internal backup functions provided by andOTP to backup your accounts! Everything else WILL result in data loss.

Opening the backups on your PC:

  • OpenPGP: OpenPGP can be used to easily decrypt the OpenPGP-encrypted backups on your PC.
  • WebDecrypt: JavaScript-based decryption of the new password-protected backup format in the browser (source code).
  • andOTP-decrypt: Python script written by @asmw to decrypt the old and new password-protected backup format on your PC.
  • mac2fa: Electron app for macOS that lives in your system tray and generates OTPs from an encrypted backup file.
  • go-andotp: CLI Program written in go to encrypt/decrypt andOTP files on your PC. Decrypted files can be encrypted and imported back to andOTP.

Automatic backups:

  • BroadcastReceivers: AndOTP supports a number of broadcasts to perform automated backups, eg. via Tasker. These will get saved to the defined backup directory. These only work when KeyStore is used as the encryption mechanism
    • org.shadowice.flocke.andotp.broadcast.PLAIN_TEXT_BACKUP: Perform a plain text backup. WARNING: This will save your 2FA tokens onto the disk in an unencrypted manner!
    • org.shadowice.flocke.andotp.broadcast.ENCRYPTED_BACKUP: Perform an encrypted backup of your 2FA database using the selected password in settings.

Migration:

Check out this wiki page to learn about the different ways to migrate to andOTP from other 2FA apps.

Downloads:

Get it on Google Play Get it on F-Droid Get it on GitHub

Warning: All three versions (Google Play, F-Droid and the APKs) are not compatible (not signed by the same key)! You will have to uninstall one to install the other, which will delete all your data. So make sure you have a current backup before switching!

Contribute:

  • Translation: If you want to help translate andOTP into your language head over to the Crowdin project.
  • Bug reports and feature requests: You can report bugs and request features in the Issue tracker on GitHub.
  • Requesting thumbnails: If you are missing a thumbnail you can request it by opening a thumbnail request.
  • Discussion and support:
    • XDA thread (please keep off-topic to a minimum)
    • Telegram group @andOTP (if you just want important updates you can mute the group so you only get notified about pinned messages)
    • Matrix channel #andOTP:tchncs.de

Donations:

If you want to show your appreciation for our work with a small donation you can do so using the following links:

Screenshots:

Light theme:

Main Activity Settings Activity Backup Activity

Dark theme:

Main Activity Settings Activity Backup Activity

Black theme:

Main Activity Settings Activity Backup Activity

Acknowledgments:

Open-source components used:

Code examples used:

Previously used open-source components:

Previously used code examples:

License:

Copyright (C) 2017-2020 Jakob Nixdorf <[email protected]>
Copyright (C) 2015 Bruno Bierbaumer

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
Owner
andOTP
Open source two-factor authentication for Android
andOTP
Comments
  • All tokens are lost after leaving the app

    All tokens are lost after leaving the app

    Password-based encryption:

    This issue is the result of an upstream bug in certain custom ROMs. Since version 0.4.0 everyone facing this problem can switch the database encryption to the new password-based encryption in the Settings, which SHOULD solve it.

    Help wanted:

    Could everyone facing this problem please tell me those things:

    • Model of your phone
    • Which ROM are you using (exact version please)
    • Which Gapps are you using (as well with the exact version)
    • Which method are you using to lock your phone (PIN, Pattern, Swipe, Facelock, Fingerprint, ...)

    You can add those information directly to the wiki or post them here.

    Original issue

    Since the last update all my tokens are gone if i restart the app (or even if it it just moved to the background).

    Steps to reproduce

    1.) add new token via QR-Code scan -> token is listed in the app 2.) go to homescreen 3.) switch to app again

    Expected Behaviour

    added token is still there

    Actual Behaviour

    no token listed

    App Version: 0.2.3 (Play Store) Android Version: 5.0 Device: BQ Aquaris E4.5

  • [Testing] Password-based encryption

    [Testing] Password-based encryption

    Please report all bugs encountered in the test version for password-based encryption here! Provide a detailed description of how you encountered/reproduced the bug and a logcat!

    Download of the test version:

    • v6 (current, beta): https://cloud.shadowice.org/s/a5RE3UovB6BuFjf
    • v5 (beta): https://cloud.shadowice.org/s/y1Ckm2Ar5ewGBEk
    • v4 (beta): https://cloud.shadowice.org/s/0vdIcBNKBA6wZ4n
    • v3 (beta): https://cloud.shadowice.org/s/0keZJG5jzBIG4st
    • v2 (alpha): https://cloud.shadowice.org/s/Ek6dxFqOyg60nYh
    • v1 (pre-pre-pre-alpha) https://cloud.shadowice.org/s/32vZoc5Qojd53OE

    You will have to uninstall previous versions from F-Droid or Google Play before installing the test version.

  • [Question] Which icons should be included in andOTP?

    [Question] Which icons should be included in andOTP?

    Hey guys, it's time to ask for your opinion again.

    @RichyHBM is currently in the process of implementing the ability to assign icons to the entries in andOTP (see #14).

    We decided not to implement an option to manually select icons as this would make storage and backups very large and a lot more complicated. Instead we will be shipping a selection of pre-defined icons with andOTP which can be selected. For that reason we wanted to know:

    Which icons do you want to see shipped with andOTP?

    If you want to help even more please link an icon with your suggestion so I don't have to search every single one myself. Please only use icons that are available as vector graphics, everything else will increase the size of andOTP to much. You can head over to this Github repository to find a large collection of vector icons (searchable website here).

    I will try to collect the suggestions periodically in this first post to give a quick overview. Icons I added to this post will be crossed out of the original post suggesting them.

    Icons to be included

    Icon | License | Comment | Included ----- | ---------- | ------------- | ----------- Amazon | | | ✅ AngelList | CC0-1.0 | | ✅ Apple | CC0-1.0 | | ✅ BattleNet / Blizzard | | | ✅ Bitbucket | CC0-1.0 | | ✅ Bitcoin | CC0-1.0 | | ✅ Bitstamp | | | 🔶 (no vector) Bitwarden | | | 🔶 (no vector) Cloudflare | CC0-1.0 | | ✅ Coinbase | | | ✅ Cozycloud | | to large | ✅ Digital Ocean | CC0-1.0 | | ✅ Discord | CC0-1.0 | | ✅ Dropbox | CC0-1.0 | | ✅ Facebook | CC0-1.0 | | ✅ Git | CC0-1.0 | generic | ✅ Github | CC0-1.0 | | ✅ GitLab | CC0-1.0 | | ✅ Google | CC0-1.0 | | ✅ IFTTT | CC0-1.0 | | ✅ Kickstarter | CC0-1.0 | | ✅ LastPass | | | ✅ Mailgun | CC0-1.0 | | ✅ Mastodon | | too large | ✅ Microsoft| CC0-1.0 | only the icon | ✅ Origin | | | ✅ Nextcloud | | | ✅ Paypal | CC0-1.0 | | ✅ Protonmail | | too large | ✅ RSS-Feeds | | | ✅ Slack | CC0-1.0 | | ✅ Steam | CC0-1.0 | | ✅ Stripe | CC0-1.0 | | ✅ Twitch | CC0-1.0 | | ✅ Twitter | CC0-1.0 | | ✅ WordPress | CC0-1.0 | | ✅

    Icons without image (yet)

    • ArenaNet
    • Hurricane Electric
    • Teamviewer
    • Ubisoft
  • andOTP generating invalid codes

    andOTP generating invalid codes

    General information

    • App version: 0.6.1
    • App source: F-Droid but I have also tried with the Google Play version
    • Android Version: 4.4.2
    • Custom ROM: No

    Expected result

    What is expected? The code is accepted by the service and 2FA enabled What does happen instead? Every service gives a similar error message: "Invalid code" or, in GitHub's case, "Two-factor code verification failed. Please try again."

    Logcat

    https://pastebin.com/d3VPLBZq
    

    Captured on Linux with adb logcat | grep -i "org.shadowice.flocke.andotp"

    Steps to reproduce

    • Create a new (or reuse an existing) account with services that offer 2FA TOTP
    • Scan the QR code or manually input the secret
    • Use the code provided by andOTP to enable 2FA

    I have also already manually setting my timezone and time on both the phone and the computer to no avail. I have also looked at #269

  • Removed from the Google Play Store

    Removed from the Google Play Store

    andOTP was recently removed from the Google Play Store for violating their payment terms. This is most likely due to the fact that we offer in-app donation links that DO NOT use Googles In-App billing, which is against their terms.

    As a first step to get it back on Google Play I will try to provide a build flavor without donation links. The second step would be to (maybe) include Google Play In-App billing in that flavor, but I'm not sure I want to do that.

    Please share your opinions on this!

  • Have an icon or picture for each entry

    Have an icon or picture for each entry

    In order to quickly select the right entry or simply view the associated OTP in a faster way it would be nice to have a user selectable little icon/picture for each line.

  • Consider using an upstream icon package

    Consider using an upstream icon package

    Idea reposted from Telegram. Please feel free to edit this issue's title/description.

    Preparing and optimising icons doesn't really have much to do with TOTP. If possible, it might be a good idea to investigate outsourcing the icon maintenance to a third party.

    There are several interesting icon projects around, one nice example is SuperTinyIcons: https://github.com/edent/SuperTinyIcons

    This solves two problems:

    • You can just close tickets about icons and redirect people upstream. Resolves maintenance issues like existing icon consistency: https://github.com/andOTP/andOTP/issues/365
    • If the icon package is kept updated and new versions are pulled into andOTP regularly for releases then people will continue to get new icons available in the core without having to use custom icons.
  • Fingerprint doesn't unlock the app

    Fingerprint doesn't unlock the app

    General information

    • App version: 0.6.1
    • App source: Google Play
    • Android Version: 9
    • Custom ROM: No

    Expected result

    What is expected? That I'm prompted for fingerprint first when selecting Device Credentials and if that fails I'm optionally asked for a PIN.

    What does happen instead? Both the PIN keypad and the fingerprint icon appear, scanning the fingerpint has no effect and I always have to enter the PIN

    Steps to reproduce

    • Install the app
    • Switch encryption to Android KeyStore
    • Switch authentication to device credentials
    • Launch the app
  • Fails to add entry via QR-Code

    Fails to add entry via QR-Code

    General information

    • App version: 0.5.0.1 & 0.6.0-beta2
    • App source: F-Droid
    • Android Version: 7.1.2
    • Custom ROM: ResurrectionRemix v5.8.5

    Expected result

    What is expected? The app fails to add a new entry via scanning the qr-code. I've added all my previous entries on version 0.4.x without any problem. My os has not changed since then, so i assume its some internal problem.

    After scanning the qr-code the error "Verschlüsselungsschlüssel nicht geladen (encryption key was not loaded)" is displayed. However I can add new entries if I configure them manually, so there seems to be no problem with encrypting the database.

    What I tried so far

    • Reset the cache
    • Clear the KeyStore

    LogCat

    Im not that familiar with android debugging, so here a excessive Log. https://pastebin.com/5419mBKB

  • Language switcher doesn't work

    Language switcher doesn't work

    So I noticed that when I switch languages from the settings page, the screen of andOTP flashes but yet nothing happens, the language still remains in English, it just doesn't switch! Could this be a bug or what? Am quite confused 😕 because I noticed the strings for other languages exist in the source of andOTP but it doesn't work within the app, why?

  • Save button should be always disabled until a secret key is entered

    Save button should be always disabled until a secret key is entered

    When I try to mess around with the app by clicking on Save without actually inputting the secret key, the app just crashes and trying to restart the app, it keeps crashing on startup, so only option is to clear the app's data which shouldn't be so, I think it's rather better to maybe disable the save button when the edittext fields are still empty so as to prevent the crash from happening for people that might click save button by mistake!

  • [Thumbnail] Team Password Manager

    [Thumbnail] Team Password Manager

    Name: Team Password Manager Website: https://teampasswordmanager.com/ Link to SVG or EPS image: logo team-password-manager traced export (I traced/recreated this from their ~60px bitmap logo, as I couldn't find vector graphics anywhere — so it is far from an official version.)

  • Unable to create GPG backups since some versions

    Unable to create GPG backups since some versions

    Links to: https://github.com/andOTP/andOTP/issues/995

    General information

    • App version: 0.9.0.1-play
    • App source: Google Play
    • Android Version: 12
    • Custom ROM: No (MIUI 13.0.3 Stable)

    Expected result

    Allow me to click the backup button and the modal will ask me the key to use

    ℹ️ It was working in previous versions, I have backups since august of 2019 until august of 2021. Not clear when it started to be broken. I appears I started doing AES backups instead in march of 2022.

    What does happen instead?

    No modal, unable to click on backup button. It says I have selected not provider.

    Steps to reproduce

    Steps:

    • Install OpenKeychain
    • Load a key in the OpenKeychain app
    • Go to the andOTP app
    • Select OpenKeychain as a provider
    • Suspicious bug number 1: in the menu it says that a key was selected (impossible because the provider was just set)
    • Go to backup
    • Selected GPG
    • It says that I must select a provider in settings

    If you want to be allowed to created a buggy backup then after selecting a provider follow https://github.com/andOTP/andOTP/issues/995 and just add some text in the key email setting

  • Empty GPG backup file

    Empty GPG backup file

    General information

    • App version: 0.9.0.1-play
    • App source: Google Play
    • Android Version: 12
    • Custom ROM: No (MIUI 13.0.3 Stable)

    Expected result

    Create a GPG backup file that is not empty

    What does happen instead?

    It creates an empty backup file making the user think it did work (how dangerous !)

    Steps to reproduce

    Steps:

    • Install OpenKeychain
    • Load a key in the OpenKeychain app
    • Set a non valid email for the a key in the OpenKeychain app
    • Backup and see that the file is empty
    • Set a valid email
    • Backup and see that the file is also empty
  • Tag counters

    Tag counters

    Is your feature request related to a problem? Please describe. No

    Describe the solution you'd like To be able to view a the number of tokens associated with each tag in the tags drawer, such as putting the count in parenthesis in the list of tags e.g. "Some Tag (4)"

    Describe alternatives you've considered None

    Additional context I made a test implementation on my own branch here: https://github.com/ian-collier-osu/andOTP/tree/a4. However I'm not sure creating a new object for Tags is the best way to work around having no tag database entity.

  • [Thumbnail] MyAnimeList

    [Thumbnail] MyAnimeList

    Name: MyAnimeList Website: https://myanimelist.net/ Link to SVG or EPS image: https://drive.google.com/file/d/1pn1Y0Egn_aGdgPnJRLFDZcNzkwdsvZLe/view?usp=sharing

    I could not find any official SVG/EPS image. The image linked is manually traced from here using Inkscape.

Oct 8, 2022
Yet another ykman Go lib for requesting OATH TOTP Multi-Factor Authentication Codes from Yubikey Devices

ykmangoath Ykman OATH TOTP with Go Yet another ykman Go lib for requesting OATH TOTP Multi-Factor Authentication Codes from Yubikey Devices. ?? Work-i

Jul 3, 2022
Authentication Plugin for implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication
Authentication Plugin for implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication

Authentication Plugin for implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication

Jan 8, 2023
A simple passwordless authentication middleware that uses only email as the authentication provider
A simple passwordless authentication middleware that uses only email as the authentication provider

email auth A simple passwordless authentication middleware that uses only email as the authentication provider. Motivation I wanted to restrict access

Jul 27, 2022
Authorization and authentication. Learning go by writing a simple authentication and authorization service.

Authorization and authentication. Learning go by writing a simple authentication and authorization service.

Aug 5, 2022
The Single Sign-On Multi-Factor portal for web apps
The Single Sign-On Multi-Factor portal for web apps

Authelia is an open-source authentication and authorization server providing two-factor authentication and single sign-on (SSO) for your applications

Jan 8, 2023
Open source RBAC library. Associate users with roles and permissions.
Open source RBAC library. Associate users with roles and permissions.

ℹ️ This package is completely open source and works independently from Permify. Associate users with roles and permissions This package allows you to

Jan 2, 2023
Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.

❗ Cache package has been moved to libcache repository Go-Guardian Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to

Dec 23, 2022
Go login handlers for authentication providers (OAuth1, OAuth2)
Go login handlers for authentication providers (OAuth1, OAuth2)

gologin Package gologin provides chainable login http.Handler's for Google, Github, Twitter, Facebook, Bitbucket, Tumblr, or any OAuth1 or OAuth2 auth

Dec 30, 2022
Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications.

Goth: Multi-Provider Authentication for Go Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applic

Dec 29, 2022
HTTP Authentication middlewares

goji/httpauth httpauth currently provides HTTP Basic Authentication middleware for Go. It is compatible with Go's own net/http, goji, Gin & anything t

Dec 23, 2022
[DEPRECATED] Go package authcookie implements creation and verification of signed authentication cookies.

Package authcookie import "github.com/dchest/authcookie" Package authcookie implements creation and verification of signed authentication cookies. Co

Dec 22, 2022
Basic and Digest HTTP Authentication for golang http

HTTP Authentication implementation in Go This is an implementation of HTTP Basic and HTTP Digest authentication in Go language. It is designed as a si

Dec 22, 2022
Go (lang) HTTP session authentication

Go Session Authentication See git tags/releases for information about potentially breaking change. This package uses the Gorilla web toolkit's session

Dec 22, 2022
A reverse proxy that provides authentication with Google, Github or other providers.
A reverse proxy that provides authentication with Google, Github or other providers.

A reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others) to validate accounts by email, domain or group.

Jan 8, 2023
A reverse proxy that provides authentication with Google, Github or other providers.
A reverse proxy that provides authentication with Google, Github or other providers.

A reverse proxy and static file server that provides authentication using Providers (Google, GitHub, and others) to validate accounts by email, domain

Jan 1, 2023
Authentication server for Docker Registry 2

The original Docker Registry server (v1) did not provide any support for authentication or authorization. Access control had to be performed externally, typically by deploying Nginx in the reverse proxy mode with Basic or other type of authentication. While performing simple user authentication is pretty straightforward, performing more fine-grained access control was cumbersome.

Jan 2, 2023
Authentication service that keeps you in control without forcing you to be an expert in web security.
Authentication service that keeps you in control without forcing you to be an expert in web security.

Authentication service that keeps you in control without forcing you to be an expert in web security.

Jan 1, 2023
An authentication proxy for Google Cloud managed databases
An authentication proxy for Google Cloud managed databases

db-auth-gateway An authentication proxy for Google Cloud managed databases. Based on the ideas of cloudsql-proxy but intended to be run as a standalon

Dec 5, 2022