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

Dynamic callback for Google and Facebook login #181

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

tomivm
Copy link
Collaborator

@tomivm tomivm commented Jul 6, 2021

This PR solves the error during login through Google and Facebook on development. It configures the callbackURL on passport auth using req.header.referer
After merging this the environmental variable FACEBOOK_CALLBACK_URL and GOOGLE_CALLBACK_URL are no more needed

api/passport/facebook.js Outdated Show resolved Hide resolved
api/passport/facebook.js Outdated Show resolved Hide resolved
api/passport/facebook.js Outdated Show resolved Hide resolved
@tomivm tomivm linked an issue Jul 20, 2021 that may be closed by this pull request
@tomivm tomivm requested a review from sylvansson July 23, 2021 13:53
@tomivm tomivm marked this pull request as draft August 27, 2021 18:03
@tomivm tomivm marked this pull request as ready for review September 10, 2021 02:31
Copy link
Collaborator

@sylvansson sylvansson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to have a test that checks that the right callback URL is called when we have a custom Referer header. You should be able to test this using something like nock.

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

Successfully merging this pull request may close these issues.

Google and Facebook login isn't working propperly on development.
3 participants