diff --git a/docs/guide/app-admin-module-jwt-spa.md b/docs/guide/app-admin-module-jwt-spa.md index 8c862f744..ca70aaacf 100644 --- a/docs/guide/app-admin-module-jwt-spa.md +++ b/docs/guide/app-admin-module-jwt-spa.md @@ -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()]); } } ```