lib/omniauth/strategies/oauth2.rb in oa-oauth-0.1.2 vs lib/omniauth/strategies/oauth2.rb in oa-oauth-0.1.3

- old
+ new

@@ -24,11 +24,11 @@ def callback_phase verifier = request.params['code'] @access_token = client.web_server.get_access_token(verifier, :redirect_uri => callback_url) super - rescue ::OAuth2::HTTPError => e - fail!(:invalid_credentials) + rescue ::OAuth2::HTTPError, ::OAuth2::AccessDenied => e + fail!(:invalid_credentials, e) end def auth_hash OmniAuth::Utils.deep_merge(super, { 'credentials' => {