From 32a8a028d59a6ba4c49aaa12042dbc98b042a68a Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Tue, 12 Sep 2023 23:52:41 +0800 Subject: [PATCH] Set TOTP issuer to Casdoor --- object/mfa_totp.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/object/mfa_totp.go b/object/mfa_totp.go index 89b7b33f..8a56931a 100644 --- a/object/mfa_totp.go +++ b/object/mfa_totp.go @@ -19,7 +19,6 @@ import ( "fmt" "time" - "github.com/beego/beego" "github.com/beego/beego/context" "github.com/google/uuid" "github.com/pquerna/otp" @@ -39,10 +38,11 @@ type TotpMfa struct { } func (mfa *TotpMfa) Initiate(ctx *context.Context, userId string) (*MfaProps, error) { - issuer := beego.AppConfig.String("appname") - if issuer == "" { - issuer = "casdoor" - } + //issuer := beego.AppConfig.String("appname") + //if issuer == "" { + // issuer = "casdoor" + //} + issuer := "casdoor" key, err := totp.Generate(totp.GenerateOpts{ Issuer: issuer,