jwt-auth icon indicating copy to clipboard operation
jwt-auth copied to clipboard

Wrong number of segments

Open zkenstein opened this issue 3 years ago • 1 comments

Tried this on SSL but return wrong number of segments. Any clue?

my middleware:

public function handle($request, Closure $next)
 {
     try {			
         // $token = JWTAuth::getToken(); 			
         $token = JWTAuth::getToken(); 			
         $getData = JWT::decode((string)$token, env('JWT_SECRET'), ['HS256']);
			
         if ($getData) {
             return $next($request);
				
         }
         else {
             return response()->json([
                 'success' => 0,
                 'login' => 1,
                 'message' => ['Client not found'],
             ], 403);
         }

     }
     catch (\Exception $e) {
         return response()->json([
             'success' => 0,
             'login' => 1,
             'message' => [$e->getMessage()],
         ], 403);
     }
		
 }

zkenstein avatar Jul 07 '21 11:07 zkenstein

After enabling modules on apache, it return the Algorithm not allowed. What I am dong wrong?

zkenstein avatar Jul 07 '21 20:07 zkenstein