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
Apologies if this a server side issue we need to resolve.
Our OAuth server returns the following response when using invalid credentials:
{"error_description":"","error":"access_denied"}
OAuth2Base.assureNoErrorInResponse will check for presence of error_description and throws a OAuth2Error. This then results in being unable to present an appropriate error message.
If I change the order of assureNoErrorInResponse error checks so that presence of params["error"] has precedence over error_description. I can display the appropriate error.
Is there any way of getting additional data from the OAuth2Error which I might be able to retrieve the access_denied error state?
The text was updated successfully, but these errors were encountered:
Yes, so if error_description is present it's preferred.
If you control the server you can remove it if it's empty (since it's useless) or you could create a pull request so that OAuth2 only prefers error_description if it's actually longer than 0 characters, something like: if let err_msg = params["error_description"] as? String, err_msg.count > 0 { in OAuth2Base.assureNoErrorInResponse.
p2
added a commit
that referenced
this issue
Nov 25, 2017
Apologies if this a server side issue we need to resolve.
Our OAuth server returns the following response when using invalid credentials:
OAuth2Base.assureNoErrorInResponse
will check for presence oferror_description
and throws aOAuth2Error
. This then results in being unable to present an appropriate error message.If I change the order of
assureNoErrorInResponse
error checks so that presence ofparams["error"]
has precedence overerror_description
. I can display the appropriate error.Is there any way of getting additional data from the
OAuth2Error
which I might be able to retrieve theaccess_denied
error state?The text was updated successfully, but these errors were encountered: