6 months ago

Hello Friends Larvel Jwt Login Error

Posted 6 months ago by Respect

// Laravel 5.7 tymon/Jwt packge v 1.0.0 working Local but dosent work on products // When Login Cradentials correct

"message": "Argument 1 passed to Tymon\JWTAuth\JWTGuard::login() must be an instance of Tymon\JWTAuth\Contracts\JWTSubject, instance of App\User given, called in /home/k77h3iqxlvo5/public_html/ on line 127",
"exception": "Symfony\Component\Debug\Exception\FatalThrowableError",
"file": "/home/k77h3iqxlvo5/public_html/",
"line": 140,

Login function look like 
public function login(Request $request)
        $credentials = request(['email', 'password']);
        if (! $token = auth()->guard('api')->attempt($credentials)) {
            return response()->json(['error' => 'Wrong Username Or Password'], 401);

Please sign in or create an account to participate in this conversation.