supabase-community / auth-ui

Pre-built Auth UI for React
https://supabase.com/docs/guides/auth/auth-helpers/auth-ui
MIT License
488 stars 121 forks source link

redirectTo prop is used for both email magic link and Google auth #263

Open Fashizel opened 4 months ago

Fashizel commented 4 months ago

Seems like the 'redirectTo' is used to fill the redirect url for both email magic link and Google auth (or any other auth for that matter) which seems like a bug.

In my NextJs application I need the redirect to go to a confirm route which needs to verify the OTP while the google auth redirect need to exchange the code to exchange the code for session, which means different redirect url

To Reproduce

Use supabase auth ui with both email magic link and google

Expected behavior

Allow to use different redirect urls depends on the login method used.

System information

NextJS application