Skip to content

Commit

Permalink
Update app-admin-module-jwt-spa.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar authored Jul 20, 2022
1 parent 1423bb9 commit 74118e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/guide/app-admin-module-jwt-spa.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ class User extends \luya\admin\ngrest\base\NgRestModel implements luya\admin\bas
return $this->id;
}

public static function loginByJwtToken(\Lcobucci\JWT\Token $token)
public static function loginByJwtToken(\Lcobucci\JWT\Token\Plain $token)
{
return self::findOne(['jwtToken' => $token->__toString()]);
// $userId = $token->claims()->get('uid');
return self::findOne(['jwtToken' => $token->toString()]);
}
}
```
Expand Down

0 comments on commit 74118e9

Please sign in to comment.