fix(auth): preserve resolved token version on oauth login

This commit is contained in:
IanShaw027
2026-04-22 16:01:25 +08:00
parent ca4e38aa01
commit 82259d1380
4 changed files with 29 additions and 7 deletions

View File

@@ -1500,6 +1500,9 @@ func resolvedTokenVersion(user *User) int64 {
if user == nil {
return 0
}
if user.TokenVersionResolved {
return user.TokenVersion
}
material := strings.ToLower(strings.TrimSpace(user.Email)) + "\n" + user.PasswordHash
sum := sha256.Sum256([]byte(material))