fix(auth): force a password change after reset_admin
reset_admin now sets a persisted must_change_password flag. While it is set, login and confirm_mfa return PasswordChangeRequired, a ticket that only allows change_required_password, instead of a session. confirm_mfa therefore returns LoginStep. change_password clears the flag and refuses the current password as the new one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2b71ae41c0
commit
411a21ca6e
4 files changed
+246
-31
No files matched your search
@@ -44,6 +44,8 @@ pub struct User {
|
||||
/// Changes when the password changes and at each completed login, which
|
||||
/// voids the pending MFA tokens issued before it.
|
||||
pub auth_epoch: u64,
|
||||
/// Set by `reset_admin`: no ordinary session until the password changes.
|
||||
pub must_change_password: bool,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for User {
|
||||
|
||||
Reference in new issue
Block a user