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

redirectToPath is ignored via social login #240

Closed
gusfune opened this issue May 1, 2021 · 2 comments
Closed

redirectToPath is ignored via social login #240

gusfune opened this issue May 1, 2021 · 2 comments
Assignees

Comments

@gusfune
Copy link

gusfune commented May 1, 2021

I just noticed that social login is not redirecting according to redirectToPath parameter.

We are using this exact implementation with NextJS (latest): https://supertokens.io/docs/thirdpartyemailpassword/common-customizations/handling-signin-success - refer to item no. 1.

With email and password, it redirects, but with social login (FB and Google), it doesn't.
I recorded a short video showing up: https://www.loom.com/share/93465728ba4d460191169a34e2fbf346?from_recorder=1
Here is on our front-end init, we didn't modify any of it:

ThirdPartyEmailPasswordReact.init({
        getRedirectionURL: async (context) => {
          if (context.action === "SUCCESS") {
            return context.redirectToPath === undefined
              ? "/"
              : context.redirectToPath
          }
        },
[...]

From what I see, it seems when the social login callback, it removes the redicrectToPath param, which defaults the redirect back to the home page.

@rishabhpoddar rishabhpoddar self-assigned this May 1, 2021
@rishabhpoddar
Copy link
Member

@gusfune this issue has been fixed in v0.10.1. Thanks for pointing it out.

@gusfune
Copy link
Author

gusfune commented May 2, 2021

Awesome! Thanks for the quick response.

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