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
{{ message }}
Repository navigation
AuthenticationException shouldn't be thrown when user denies access #170
SimpleAuthentication.Core.Exceptions.AuthenticationException: Reason: user_denied. Error: access_denied. Description: Permissions error.
at SimpleAuthentication.Core.Providers.FacebookProvider.RetrieveAuthorizationCode(NameValueCollection queryStringParameters)
at SimpleAuthentication.Core.Providers.BaseOAuth20Provider`1.AuthenticateClient(NameValueCollection queryStringParameters, String state, Uri callbackUri)
at SimpleAuthentication.Mvc.SimpleAuthenticationController.AuthenticateCallback(AuthenticateCallBackInputModel inputModel)
From what I can find in the documentation, the user_denied/access_denied is caused by the fact that the user doesn't accept your app to gain access to their account. Since this is a valid scenarion, it should be possible to identify this in your own code (I can't figure out if it's possible to hook into the authenticate callback code).
Activity
ThomasArdal commentedon Aug 3, 2015
Looks to be better support for this scenario in the Twitter provider:
Failed to accept the Twitter App Authorization. Therefore, authentication didn't proceed.
But it still throws an exception inside code that I cannot wrap in a try-catch.
PureKrome commentedon Aug 3, 2015
So maybe return a null
UserInformationinstead?ThomasArdal commentedon Aug 4, 2015
I think that would be a better solution. And maybe an enum or similar
explaining what went "wrong"?
On Tue, Aug 4, 2015 at 1:05 AM Pure Krome notifications@github.com wrote: