Skip to content

Commit

Permalink
Simplify OTP Registration
Browse files Browse the repository at this point in the history
- 2FA validates in session on registration.

Change-Id: If0a8d6a40c96aaa774884a722bf9ab9152418255
  • Loading branch information
Zatcmk committed Oct 17, 2023
1 parent 8544faf commit 73b7b7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmk/gui/wato/pages/user_profile/two_factor.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def _action(self) -> None:
"alias": "",
}
save_two_factor_credentials(user.id, credentials)
session.session_info.two_factor_completed = True
flash(_("Registration successful"))
origtarget = "user_two_factor_overview.py"
raise redirect(origtarget)
Expand Down Expand Up @@ -604,7 +605,7 @@ def page(self) -> JsonSerializable:
}
)
save_two_factor_credentials(user.id, credentials)

session.session_info.two_factor_completed = True
flash(_("Registration successful"))
return {"status": "OK"}

Expand Down

0 comments on commit 73b7b7f

Please sign in to comment.