feat: fix missing MFA session issue (#2667)

This commit is contained in:
Yaodong Yu
2024-02-02 10:23:17 +08:00
committed by GitHub
parent e593f5be5b
commit bbbda1982f
3 changed files with 6 additions and 13 deletions

View File

@ -35,10 +35,7 @@ type SmsMfa struct {
func (mfa *SmsMfa) Initiate(ctx *context.Context, userId string) (*MfaProps, error) {
recoveryCode := uuid.NewString()
err := ctx.Input.CruSession.Set(MfaRecoveryCodesSession, []string{recoveryCode})
if err != nil {
return nil, err
}
ctx.Output.Session(MfaRecoveryCodesSession, []string{recoveryCode})
mfaProps := MfaProps{
MfaType: mfa.Config.MfaType,