Skip to content

Commit

Permalink
[FIX] Issue with hybrid OIDC / Local auth
Browse files Browse the repository at this point in the history
  • Loading branch information
whikernel committed Nov 14, 2024
1 parent 2c7f55e commit 50cf190
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/app/blueprints/login/login_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,16 @@ def oidc_authorise():
if user and not user.active:
return response_error("User not active in IRIS", 403)

return wrap_login_user(user)
return wrap_login_user(user, is_oidc=True)

def wrap_login_user(user):
def wrap_login_user(user, is_oidc=False):

session['username'] = user.user

if 'SERVER_SETTINGS' not in app.config:
app.config['SERVER_SETTINGS'] = get_server_settings_as_dict()

if app.config['SERVER_SETTINGS']['enforce_mfa']:
if app.config['SERVER_SETTINGS']['enforce_mfa'] is True and is_oidc is False:
if "mfa_verified" not in session or session["mfa_verified"] is False:
return redirect(url_for('mfa_verify'))

Expand Down

0 comments on commit 50cf190

Please sign in to comment.