mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
[BUGFIX] 2FA after 1FA only when necessary for access to target (#881)
* prevents requirement to always 2FA if the user doesn't have permission to access a target URL
This commit is contained in:
parent
4b664cf15f
commit
e72c653f6e
|
@ -34,8 +34,8 @@ func Handle1FAResponse(ctx *middlewares.AutheliaCtx, targetURI string, username
|
|||
|
||||
ctx.Logger.Debugf("Required level for the URL %s is %d", targetURI, requiredLevel)
|
||||
|
||||
if requiredLevel > authorization.OneFactor {
|
||||
ctx.Logger.Warnf("%s requires more than 1FA, cannot be redirected to", targetURI)
|
||||
if requiredLevel == authorization.TwoFactor {
|
||||
ctx.Logger.Warnf("%s requires 2FA, cannot be redirected yet", targetURI)
|
||||
ctx.ReplyOK()
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user