diff --git a/src/OAuth/FortifiProvider.php b/src/OAuth/FortifiProvider.php index 1f7bb3b..a798a85 100644 --- a/src/OAuth/FortifiProvider.php +++ b/src/OAuth/FortifiProvider.php @@ -260,7 +260,11 @@ protected function getDefaultScopes() */ protected function checkResponse(ResponseInterface $response, $data) { - //error_log(print_r(['data' => $data, 'resp' => $response], true)); + if($response->getStatusCode() != 200) + { + $msg = Arrays::value($data, ['message'], 'An unknown error occurred'); + throw new IdentityProviderException($msg, $response->getStatusCode(), (array)$data); + } } /**