Only enforce password-change invalidation for sessions that include a password fingerprint.
This commit is contained in:
1 parent
d4b6f3d25f
commit
9defe7e3e0
1 file changed
+2
-1
+2
-1
@@ -41,7 +41,8 @@ export async function checkAuth(request: Request) {
|
||||
if (key?.userId) {
|
||||
user = await getUser(key.userId, { includePassword: true });
|
||||
|
||||
if (user && hash(user.password) !== key.pwd) {
|
||||
// Only enforce password-change invalidation for sessions that include a password fingerprint.
|
||||
if (user && key.pwd && hash(user.password) !== key.pwd) {
|
||||
user = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user