From 74118e94ac4130226b925f6d2312a028287418c0 Mon Sep 17 00:00:00 2001 From: Basil Date: Wed, 20 Jul 2022 16:01:31 +0200 Subject: [PATCH] Update app-admin-module-jwt-spa.md --- docs/guide/app-admin-module-jwt-spa.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()]); } } ```