Back to services

2FAuth

Manage your Two-Factor Authentication (2FA) accounts and generate their security codes.

View alternatives to 2FAuth
Suggest edit
Open source
Self-hostable
AGPL-3.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Overview

2FAuth is a web-based, self-hosted one-time password (OTP) generator. It replaces mobile 2FA apps such as Google Authenticator and works on both phones and desktop browsers. The project is open source under the AGPL-3.0 license and has more than 4,000 stars on GitHub.

The author built it for these reasons:

  • Many similar apps show the codes for all your accounts at once, along with countdown timers, which can feel stressful;
  • Your 2FA accounts live in a separate database that is easy to back up and restore, so losing your phone doesn't mean losing all your 2FA accounts;
  • When you're working on a computer, you no longer have to pull out your phone to read a code.

Key Features

  • Account management: manage your 2FA accounts and organize them into groups;
  • Add by QR code: scan and parse QR codes to add accounts quickly;
  • Manual entry: when there's no QR code, add a custom account through the advanced form;
  • Editing: edit any account, including imported ones;
  • Code generation: supports TOTP, HOTP, and Steam Guard codes;
  • Data migration: import data in 2FAuth (JSON), Google Authenticator (QR code), Aegis (JSON, plain text), and 2FAS (JSON) formats.

The interface is currently fully available in English and French. Translations into other languages are contributed by the community through Crowdin.

Security

  • Multi-user: you must register and sign in before using it. Since version 4.0, multiple user accounts are supported. You can allow open public registration, restrict registration by email domain, disable registration entirely, or allow registration only through SSO;
  • Modern authentication: sign in with security keys such as YubiKey or Titan, and disable the traditional login form;
  • Data encryption: you can choose to encrypt sensitive data in the database to protect against database leaks. This feature is off by default; once it is enabled, we strongly recommend backing up the APP_KEY in your .env file;
  • Auto logout: you are signed out automatically after a period of inactivity. You can also set it to sign out immediately after copying a code, or turn the feature off;
  • RFC compliant: codes are generated according to RFC 4226 (HOTP) and RFC 6238 (TOTP) using the Spomky-Labs/OTPHP library.

Who It's For and Use Cases

  • Individuals who enjoy self-hosting and want to control their own 2FA data;
  • People who often sign in to services on a computer and don't want to take out their phone every time;
  • People who worry that they won't be able to recover their 2FA accounts if they lose their phone and need reliable backups;
  • Administrators who need to provide a shared 2FA management platform for family members or a small team.

Installation and Deployment

The official documentation (docs.2fauth.app) provides guides for the following installation methods:

  • Self-hosted server deployment
  • Docker (command line)
  • Docker Compose
  • Heroku

The documentation also includes an upgrade guide and a data import guide.

Technical Requirements

  • PHP 8.4 or later (as indicated by the README badge)
  • A server that meets Laravel's requirements
  • Any database supported by Laravel

Live Demo

An official demo site is available at demo.2fauth.app. The demo account is [email protected] and the password is demo.