Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Feb 2026 14:07:20 +0000
From:      freebsd335t@xtla.net
To:        freebsd@dreamchaser.org
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: two-factor auth enabling problem
Message-ID:  <177047324639.7.17893814233610811153.1162146245@xtla.net>
In-Reply-To: <f704f228-02ec-41f1-b328-bf7dc7d62ba1@dreamchaser.org>

index | next in thread | previous in thread | raw e-mail

On Friday, February 6th, 2026 at 23:23, Gary Aitken <freebsd@dreamchaser.org> wrote:

> "Scan this QR code or enter the plain text key into a TOTP app
> (e.g. Google Authenticator, Authy, Duo Mobile) and
> enter the code in the field below to activate two-factor authentication."
[...]
> Somewhat lost here... any help much appreciated
> 
> Gary

I've used Python's "pyotp" to generate TOTP codes
Just copy the secret into a file (say 'redmine.secret')
and then simply do

$ ./totp redmine.secret
506771
$

-- code (file totp, chmod u+x) -----------------------------------
#!/usr/bin/python3
import base64
import pyotp
import sys

with open(sys.argv[1]) as f:
        base32encodedsecret = f.readline().strip()
print(pyotp.TOTP(base32encodedsecret).now())
-- end code -------------------------------




home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?177047324639.7.17893814233610811153.1162146245>