Allow legacy stateless tokens that were minted without a password fingerprint.

This commit is contained in:
Francis Cao committed 2026-06-23 13:24:55 -07:00
1 parent 3b792720af
commit 3888ec6f4f
2 files changed
+11 -1

No files matched your search

+2 -1
View File
@@ -32,7 +32,8 @@ export async function checkAuth(request: Request) {
user = await getUser(userId, { includePassword: true });
// Reject tokens issued before the current password.
if (user && hash(user.password) !== payload.pwd) {
// Allow legacy stateless tokens that were minted without a password fingerprint.
if (user && payload.pwd && hash(user.password) !== payload.pwd) {
user = null;
}
} else if (redis.enabled && authKey) {