Open khrigo opened 1 year ago
The default Auth
facade does not support the refresh()
method, it is specific to JWTGuard
. You can use a workaround like
$guard = Auth('api');
if (! $guard instanceof JWTGuard) {
// handle wrong guard, i.e. throw runtime exception
}
return response()->json([
'token_type' => 'Bearer',
'access_token' => $guard->refresh(),
]);
Subject of the issue
I receiving from phpstan
Call to an undefined static method Illuminate\Support\Facades\Auth::refresh()
Your environment