You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to log in with invalid credentials (Incorrect Client ID or Secret), the expected behavior is to through an exception.
I was trying to create an Login Ouath for Github. By providing incorrect credentials. the application redirects me to 404 error page on GitHub without logging any exceptions.
publicfunctionhandle_social_login($provider) {
$config = $this->get_config($provider);
$hybridauth = newHybridauth($config);
try {
$hybridauth->authenticate($provider);
}
catch (Exception\AuthorizationDeniedException$e) {
write_log('User denied the authentication/authorization request.');
}
catch (Exception\HttpClientFailureException$e) {
write_log('Error in client: Network issues or server configuration problems.');
}
catch (Exception\HttpRequestFailedException$e) {
write_log('Error in request: Requested URL returned errors.');
}
catch (Exception\InvalidApplicationCredentialsException$e) {
write_log('Invalid application credentials.');
}
catch (Exception\InvalidAuthorizationCodeException$e) {
write_log('Invalid OAuth2 authorization code.');
}
catch (Exception\InvalidAuthorizationStateException$e) {
write_log('Invalid or used OAuth2 authorization state.');
}
catch (Exception\InvalidOauthTokenException$e) {
write_log('Invalid OAuth1 oauth_token.');
}
catch (Exception\InvalidAccessTokenException$e) {
write_log('Invalid OAuth1 access_token.');
}
catch (Exception\InvalidOpenidIdentifierException$e) {
write_log('Invalid OpenID identifier.');
}
catch (Exception\UnexpectedApiResponseException$e) {
write_log('Unexpected response from the API.');
}
catch (Exception\NotImplementedException$e) {
write_log('Requested method or operation not implemented.');
}
catch (Exception\BadMethodCallException$e) {
write_log('Callback refers to an undefined method or missing arguments.');
}
catch (Exception\UnexpectedValueException$e) {
write_log('Value doesn\'t match with a set of values.');
}
catch (Exception\RuntimeException$e) {
write_log('Runtime error.');
}
catch (Exception\InvalidArgumentException$e) {
write_log('Argument not of the expected type.');
}
catch (\Exception$e) {
// Generic catch-all
write_log($e->getMessage());
}
}
None of the exception caught.
The text was updated successfully, but these errors were encountered:
When attempting to log in with invalid credentials (Incorrect Client ID or Secret), the expected behavior is to through an exception.
I was trying to create an Login Ouath for Github. By providing incorrect credentials. the application redirects me to 404 error page on GitHub without logging any exceptions.
None of the exception caught.
The text was updated successfully, but these errors were encountered: