supabase-ui-svelte icon indicating copy to clipboard operation
supabase-ui-svelte copied to clipboard

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

Open escapingSamsara opened this issue 2 years ago • 2 comments

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 avatar Oct 09 '23 09:10 escapingSamsara

Seeing the same behavior, any workarounds?

svickers avatar Dec 06 '23 01:12 svickers

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

asjir avatar Feb 20 '24 22:02 asjir