Skip to content

Commit 607c015

Browse files
authored
chore(api): log new session with mfa (#6151)
Signed-off-by: francois samin <[email protected]>
1 parent 01792c2 commit 607c015

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

engine/api/auth.go

+4
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,11 @@ func (api *API) postAuthSigninHandler() service.Handler {
275275
sessionDuration := driver.GetSessionDuration()
276276
var session *sdk.AuthSession
277277
if userInfo.MFA {
278+
trackSudo(ctx, w)
278279
session, err = authentication.NewSessionWithMFA(ctx, tx, api.Cache, consumer, sessionDuration)
280+
if err == nil {
281+
log.Info(ctx, "starting new session %s with MFA for consumer %s", session.ID, consumer.ID)
282+
}
279283
} else {
280284
session, err = authentication.NewSession(ctx, tx, consumer, sessionDuration)
281285
}

0 commit comments

Comments
 (0)