From 365b5753419238bb96bc3f9b744d380ff20cbafc Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 7 Apr 2025 16:14:41 +0200 Subject: [feature] add TOTP two-factor authentication (2FA) (#3960) * [feature] add TOTP two-factor authentication (2FA) * use byteutil.S2B to avoid allocations when comparing + generating password hashes * don't bother with string conversion for consts * use io.ReadFull * use MustGenerateSecret for backup codes * rename util functions --- go.mod | 2 ++ 1 file changed, 2 insertions(+) (limited to 'go.mod') diff --git a/go.mod b/go.mod index 2ce378146..6b259c729 100644 --- a/go.mod +++ b/go.mod @@ -56,6 +56,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/ncruces/go-sqlite3 v0.25.0 github.com/oklog/ulid v1.3.1 + github.com/pquerna/otp v1.4.0 github.com/prometheus/client_golang v1.21.1 github.com/rivo/uniseg v0.4.7 github.com/spf13/cobra v1.9.1 @@ -106,6 +107,7 @@ require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect github.com/bytedance/sonic v1.12.7 // indirect github.com/bytedance/sonic/loader v0.2.2 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect -- cgit v1.2.3