mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Merge pull request #1408 from appwrite/fix-jwt-validate-attribute
fix(jwt): correct session validation
This commit is contained in:
commit
f388c44e20
1 changed files with 1 additions and 1 deletions
|
|
@ -467,7 +467,7 @@ App::setResource('user', function($mode, $project, $console, $request, $response
|
|||
$user = $projectDB->getDocument($jwtUserId);
|
||||
}
|
||||
|
||||
if (empty($user->search('$id', $jwtSessionId, $user->getAttribute('tokens')))) { // Match JWT to active token
|
||||
if (empty($user->search('$id', $jwtSessionId, $user->getAttribute('sessions')))) { // Match JWT to active token
|
||||
$user = new Document(['$id' => '', '$collection' => Database::SYSTEM_COLLECTION_USERS]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue