Followed the Laravel installation and quick start, getting error: "Tymon\\JWTAuth\\JWTGuard::login(): Argument #1 ($user) must be of type Tymon\\JWTAuth\\Contracts\\JWTSubject #2237
message: "Tymon\JWTAuth\JWTGuard::login(): Argument # 1 ($user) must be of type Tymon\JWTAuth\Contracts\JWTSubject, Illuminate\Auth\GenericUser given, called in /var/www/html/vendor/tymon/jwt-auth/src/JWTGuard.php on line 124"
To clarify, I do have the following in the Users.php model:
class User extends Authenticatable implements JWTSubject
Your environment
Q
A
Bug?
yes
New Feature?
no
Framework
Laravel
Framework version
9.19
Package version
?
PHP version
8.0.30
Steps to reproduce
Instal Laravel
Connected to DB
Created user table
Follow the jwt-auth Laravel installation and quick start
Subject of the issue
Followed the Laravel installation and quick start, getting the error:
500 Internal Server Error
To clarify, I do have the following in the
Users.php
model:class User extends Authenticatable implements JWTSubject
Your environment
Steps to reproduce
Expected behaviour
Return the reponse:
Actual behaviour
500 error as outlined above