fix: resetting the password or cancelling a registration ends existing sessions: a token issued before the change is refused
This commit is contained in:
1 parent
81c4b62175
commit
f3ec3d2fa2
15 files changed
+844
-13
No files matched your search
@@ -160,6 +160,7 @@ func (u *UserRepository) ResetPassword(userId uint32, hashedPassword string) (do
|
||||
localUser.Password = hashedPassword
|
||||
localUser.PasswordResetCode = mappers.DomainToNullableString("")
|
||||
localUser.PasswordResetExpiration = time.Time{}
|
||||
localUser.TokenVersion++
|
||||
err = u.db.Save(&localUser).Error
|
||||
if err != nil {
|
||||
return domainUser.User{}, err
|
||||
|
||||
Reference in new issue
Block a user