-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle MissingAuthorizationCodeException in a user friendly way #24
Comments
Hi @shairyar! Can you post your authenticator class? Does it extend SocialAuthenticator? If you use the fetchAccessToken method in your |
Hi, Yes my authenticator class extends SocialAuthenticator and this is what my class looks like
|
Hi @shairyar! Ok! In getCredentials(), use |
Hi @weaverryan, Many thanks, that worked perfectly but I now have another issue. The app that I am working on, I can only link social media accounts after creating an account manually. So if I am logged in already and I am at profile page of the app, i have this facebook button to link, suppose on the facebook popup permission i click on cancel it takes me to the login screen rather than my profile page. Inside my Where is this login redirect being handled?
The if part is not being taken into consideration, i |
Hmm, a few things:
Cheers! |
Hi, Thanks for getting back to me. I can confirm that on clicking cancel it does go to
It looks like to me before even getting to |
Yes, when you fail authentication, it clears the token (i.e. logs you out). I forgot about that :). The general problem is that - since the user is already authenticated - we don't really need to send them through the authentication process again (i.e. Guard). There are two possible solutions:
(2) is a little ugly, but a little easier. (1) is the proper solution :) Cheers! |
Many thanks @weaverryan |
Hi,
In case user clicks on cancel button on facebook permission popup then on development env i see MissingAuthorizationCodeException which is fine, but i need to display a friendly message on frontend rather than seeing a blank white screen on production. How can i handle this inside the
FacebookAuthenticator
as it does not seem to be going insideonAuthenticationFailure
method?The text was updated successfully, but these errors were encountered: