Home > Software design >  Invalid JWT token causes a 500 server error In Laravel
Invalid JWT token causes a 500 server error In Laravel

Time:07-19

Iam New In JWT Auth Token And I don't Know Why I Have Error 500 | SERVER ERROR ?

This Is My Code

 $token = $request -> header('auth_token'); // The Header is tab in postman
        if ($token) {
            JWTAuth::setToken($token)->invalidate(); // This Line Make Error 500
            return $this -> returnSuccessMessage('Logged Out Successfully');
        } else {
            return $this->returnError('5100' , 'Someting went error');
        }

    }

CodePudding user response:

if you are work in postman Change the Check Your Token and make it == api_Token.thanks

  • Related