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

redirectTo is not used in GoTrueApi #63

Closed
laurentS opened this issue Feb 22, 2021 · 2 comments · Fixed by #64
Closed

redirectTo is not used in GoTrueApi #63

laurentS opened this issue Feb 22, 2021 · 2 comments · Fixed by #64
Labels
bug Something isn't working released

Comments

@laurentS
Copy link

laurentS commented Feb 22, 2021

Bug report

Describe the bug

If I call supabase.auth.signIn({email}, {redirectTo: "someurl"}) the redirectTo argument is passed down to https://github.com/supabase/gotrue-js/blob/6332b080c8a50a7120106288303c043a0abf8334/src/GoTrueApi.ts#L90 but then on https://github.com/supabase/gotrue-js/blob/6332b080c8a50a7120106288303c043a0abf8334/src/GoTrueApi.ts#L94 it's not actually used.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. call supabase.auth.signIn({email}, {redirectTo: "someurl"})
  2. See that the browser calls /magiclink on supabase, but the redirectTo parameter is not there.

Note that there is also something weird with the Referer header that is not set correctly for me (I'm just seeing the hostname), which means that the auth flow is completely broken: the configured site URL is not used, Referer is wrong and redirectTo is lost in the call stack. I'll open a separate issue about the referer.
Edit: I'm trying to figure out where this referer issue is coming from, I seem to only see it on localhost, so it might be related to the dev server (I'm using svelte and sapper) somehow.

Expected behavior

It should be there, if we want to get it back out on the other end :)

@laurentS laurentS added the bug Something isn't working label Feb 22, 2021
@kiwicopple
Copy link
Member

Thanks @laurentS 👍 added to the missing routes

@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 1.11.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants