Skip to content

Commit

Permalink
Catch relevant error during callback phase
Browse files Browse the repository at this point in the history
I am not sure under which circumstances the original
error condition yielding the CallbackError occurs. The
newly added error occurs when we try to exchange the
access token, but the client credentials are wrong.
Thus I assume that we'd receive the same for all errors
specified by the OAuth 2.0 spec.
  • Loading branch information
NobodysNightmare committed Jan 31, 2025
1 parent d63f596 commit e8c2564
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/omniauth/openid_connect/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module OmniAuth
module OpenIDConnect
VERSION = '0.4.0'
VERSION = '0.4.1'
end
end
2 changes: 1 addition & 1 deletion lib/omniauth/strategies/openid_connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def callback_phase

super
end
rescue CallbackError => e
rescue CallbackError, Rack::OAuth2::Client::Error => e
fail!(:invalid_credentials, e)
rescue ::Timeout::Error, ::Errno::ETIMEDOUT => e
fail!(:timeout, e)
Expand Down

0 comments on commit e8c2564

Please sign in to comment.