Documentation
¶
Overview ¶
Package twofa generates and verifies TOTP secrets for the CSuit apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QRDataURL ¶
QRDataURL renders the setup QR code for an existing base32 secret as a data:image/png URL. The secret is base32-decoded first so the code encodes the same secret that Verify checks against.
func VerifyStep ¶ added in v1.2.4
VerifyStep checks a code like Verify and also returns the 30-second step it matched. Store the step per user and accept only a larger one next time, so a code cannot be used twice inside its validity window.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.