diff --git a/pkg/service/totp.go b/pkg/service/totp.go index 0c7db3e27..395171999 100644 --- a/pkg/service/totp.go +++ b/pkg/service/totp.go @@ -32,6 +32,9 @@ func NewDefaultTotpKey() (*otp.Key, error) { if len(totpAccountName) == 0 { user, ok := os.LookupEnv("USER") + if !ok { + user, ok = os.LookupEnv("USERNAME") + } if !ok { return nil, fmt.Errorf("can not get USER env var for totp account name") }