[2FAuth] One Time Passcode generators



2FAuth is a web based self-hosted alternative to One Time Passcode (OTP) generators like Google Authenticator, designed for both mobile and desktop.
It aims to ease you perform your 2FA authentication steps whatever the device you handle, with a clean and suitable interface.


  • Manage your 2FA accounts and organize them using Groups
  • Scan and decode any QR code to add account in no time
  • Add custom account without QR code thanks to an advanced form
  • Edit accounts, even the imported ones
  • Generate TOTP and HOTP security codes

Shipped version: 2.1.0~ynh2

Demo: 2FAuth Demo


Documentation and resources



J’ai installé 2Fauth, pour voir ce que ça donne, mais ça ne fonctionne pas.
Ce que je veux dire, c’est que les codes générés ne sont pas bons.
Sur mon tel, j’ai l’application Strongbox - Authenticator et sur mon ordinateur (Fedora 35), j’ai installé Authenticator Generate Two-Factor Codes et les deux applis me donnent exactement le bon code quand je l’utilise, mais 2Fauth met un code différent.

Ici sur le Forum Yunohost où j’ai activé l’authentification à deux facteurs, les codes générés sont corrects avec Strongbox - Authenticator et Authenticator Generate Two-Factor Codes, mais pas avec 2Fauth.


I installed 2Fauth, to see what it does, but it doesn’t work.
What I mean is that the generated codes are not good.
On my phone, I have the application Strongbox - Authenticator and on my computer (Fedora 35), I installed Authenticator Generate Two-Factor Codes and both apps give me exactly the right code when I use it, but 2Fauth puts a different code.

Here on the Yunohost Forum where I enabled two-factor authentication, the codes generated are correct with Strongbox - Authenticator and Authenticator Generate Two-Factor Codes, but not with 2Fauth.

Not with this app, but I had problems with OTP once, and it was due to my server clock being off.
These tools use the current timestamp, and if you are off by more than a few seconds, the code will be invalid.

Maybe this is your problem ?

1 Like


I think that’s what you’re talking about?


You should compare with a device where an OTP app works.
But it seems that the time sync is enabled so I do not know why. (But validate the time, just to be sure)

On my phone the application Strongbox - Authenticator & the application Authenticator Generate Two-Factor Codes works well, both apps show the same codes generated, I have no problem with these 2 apps, but 2FAuth installed on the server, to my surprise, does not generate the correct ones codes like on my phone and PC.
Then I wanted to test 2FAuth, it doesn’t work for me, I don’t keep it.

Anyhow, thanks for your help.

Sur mon téléphone l’application Strongbox - Authenticator & l’application Authenticator Generate Two-Factor Codes fonctionnent bien, les deux applications montrent les mêmes codes générés, je n’ai aucun souci avec ces 2 applis, mais 2FAuth installé sur le serveur, à ma grande surprise, ne génère pas les bons codes comme sur mon téléphone et mon PC.

Après j’ai voulu tester 2FAuth, ça ne fonctionne pas chez-moi, je ne le garde pas.

Merci quand même pour votre aide.

I have been testing 2FAuth and I get the same TOTP as the one given by Enpass.

There is few options that can change the output code :

  • Text brut / Base32
  • 6 / 7 / 8 / 9 / 10
  • sha1 / sha256 / sha512 / md5

The options that match Enpass TOTP are TOTP, Base32, 6, sha1

1 Like

There is still something unclear : is the time on your server correct ?
(Precisely correct, not 30sec off)

New stable version :tada: