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

signInWithEmail() functionaility doesnt redirectTo when used in <Auth/> component #16

Open
escapingSamsara opened this issue Oct 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@escapingSamsara
Copy link

Bug report

Describe the bug

The bug/issue I am currently facing is, that the Auth component i use for login and signup doesnt redirect the user after sign-in with email/password.
Oddly enough, if i enter the wanted query string into the address bar after sign-in, the user appears to be signed in because i can access his profile

To Reproduce

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

  1. Go to 'https://supabase.com/docs/guides/getting-started/tutorials/with-sveltekit'
  2. Follow the description and end up with the finished working Auth example.
  3. Change:
    view="magic_link"
    redirectTo={${data.url}/auth/callback}
    showLinks={false}
    For:
    view="sign_in"
    redirectTo={${data.url}/auth/callback}
    showLinks={true}
  4. Sign into the account using email and password (after sign-up)

Expected behavior

The behavior that should be expected should include a redirect to the given redirectTo value above after clicking the sign-in button.
But nothing happens

Screenshots

not needed to understand the issue

System information

  • OS: Linux Manjaro LTS
  • Browser: firefox
  • Version of supabase-js: [latest
  • Version of Node.js: [latest]

Additional context

magic_link login, as well as login via socials (when added like described in the supabase docs), works and redirects perfectly fine

@escapingSamsara escapingSamsara added the bug Something isn't working label Oct 9, 2023
@svickers
Copy link

svickers commented Dec 6, 2023

Seeing the same behavior, any workarounds?

@asjir
Copy link

asjir commented Feb 20, 2024

I read through supabase conversation on this issue and this seems to be the intended behaviour.
The way to implement it is by listening to auth events

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

No branches or pull requests

3 participants