Skip to content

Commit 1a43294

Browse files
committed
fix: switch to token email for redundancy
1 parent bddb6cb commit 1a43294

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Auth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,12 +752,12 @@ public function verifyToken(string $token)
752752
new Key(Config::get('token.secret') . '-verification', 'HS256')
753753
);
754754

755-
if (!isset($decodedToken['user.id'])) {
755+
if (!isset($decodedToken['user.email'])) {
756756
$this->errorsArray['token'] = 'Invalid token';
757757
return null;
758758
}
759759

760-
$user = $this->find($decodedToken['user.id']);
760+
$user = $this->find($decodedToken['user.email']);
761761

762762
if (!$user) {
763763
$this->errorsArray['token'] = 'User not found';

0 commit comments

Comments
 (0)