Skip to content

Commit

Permalink
Fix credentials validation for laravel 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
glena authored May 3, 2017
1 parent ff199a4 commit 0a3e9bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Auth0/Login/Auth0UserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public function retrieveByCredentials(array $credentials)
try {
$decodedJWT = $this->auth0->decodeJWT($encUser);
} catch (CoreException $e) {
return \Response::make('Unauthorized user', 401);
return null;
} catch (InvalidTokenException $e) {
return \Response::make('Unauthorized user', 401);
return null;
}

return $this->userRepository->getUserByDecodedJWT($decodedJWT);
Expand Down

0 comments on commit 0a3e9bc

Please sign in to comment.