Skip to content

Commit

Permalink
chore(api): log new session with mfa (#6151)
Browse files Browse the repository at this point in the history
Signed-off-by: francois  samin <[email protected]>
  • Loading branch information
fsamin authored Apr 25, 2022
1 parent 01792c2 commit 607c015
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/api/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ func (api *API) postAuthSigninHandler() service.Handler {
sessionDuration := driver.GetSessionDuration()
var session *sdk.AuthSession
if userInfo.MFA {
trackSudo(ctx, w)
session, err = authentication.NewSessionWithMFA(ctx, tx, api.Cache, consumer, sessionDuration)
if err == nil {
log.Info(ctx, "starting new session %s with MFA for consumer %s", session.ID, consumer.ID)
}
} else {
session, err = authentication.NewSession(ctx, tx, consumer, sessionDuration)
}
Expand Down

0 comments on commit 607c015

Please sign in to comment.