Skip to content
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

Sometimes I do not receive token from facebook #149

Open
tuhin24 opened this issue Sep 6, 2018 · 1 comment
Open

Sometimes I do not receive token from facebook #149

tuhin24 opened this issue Sep 6, 2018 · 1 comment

Comments

@tuhin24
Copy link

tuhin24 commented Sep 6, 2018

Hi Ron,
Sometimes, I do not receive the code for facebook login. The body looks like as follows: Any tip on how to resolve this? Thanks

[0] { authorizationData:
[0] { response_type: 'code',
[0] client_id: '**********',
[0] redirect_uri: 'http://localhost:4200/',
[0] scope: 'public_profile,email',
[0] display: 'popup' },
[0] oauthData: { login: true },
[0] userData: {} }
[0] r-end
[0] (node:83663) UnhandledPromiseRejectionWarning: StatusCodeError: 400 - {"error":{"message":"Missing authorization code","type":"OAuthException","code":1,"fbtrace_id":"DiiMcrEVOek"}}

when it works, the body looks like:
{ authorizationData:
[0] { response_type: 'code',
[0] client_id: '*********',
[0] redirect_uri: 'http://localhost:4200/',
[0] scope: 'public_profile,email,
[0] display: 'popup' },
[0] oauthData:
[0] { code: 'AQBpl6uaNIp5ApAsc4IvKxw1gZotwbB8g9a4oT3KecWJ6L1yCyX5qnu6vRX7Jjm0JiQQlQrNQQX8hIBlnIBgLoQtZp03Kp2OUQgA1QIN0YEgR4RjuFloP_9u1rlfllEERlzQgxXONdU04WcNC5rzaRZjkgyb6n7v0TuY8llRaiidmNCBgz_qTeOCm6XNS7JY8kcdXrqrkb8o6HLS0qqmnnMVx3D1j6wf8Vujtwym__ZtTiHdbgeasKoNdTHTwthbftYzO0bT0wL7GSYhCqrgdjZwlt5o0yANL8rGg8beCyK-q1u1UCkKLxmBHcrPD6y5NFEHHaUJ7ztkzufXVgY3NMBv3TjoJo4RyLy-T_x2GP4dNQ',
[0] : '' },
[0] userData: {} },

@ronzeidman
Copy link
Owner

I'm guessing it's a matter of timing, the "redirectUrl" of facebook should not redirect again. This issue usually happens when you configure the redirectUrl to be the base url and it immidiately redirects again removing any query params, you sould redirect to a url that doesn't re-redirect. I hope this explanation was clear enough...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants