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

Email confirmation triggers confirm/route.js twice everytime #23452

Open
Taxeon opened this issue Apr 30, 2024 · 3 comments
Open

Email confirmation triggers confirm/route.js twice everytime #23452

Taxeon opened this issue Apr 30, 2024 · 3 comments
Labels
auth All thing Supabase Auth related bug Something isn't working cannot-reproduce Unable to reproduce the opener's problem after attempts to replicate

Comments

@Taxeon
Copy link

Taxeon commented Apr 30, 2024

Bug report

  • [ X ] I confirm this is a bug with Supabase, not with my own application. This is a basically a copy and paste or YOUR auth confirm code example. Plus, the code works fine it is just getting executed twice every time a confirmation email link is clicked.
  • [ X ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Every time I click my confirmation email link sent to me via Auth signup the custom auth/confirm/route.js, which is a copy of the code you provide in your documentation, runs twice. The first pass successfully processes but since the second call is also running that one fails and often triggers the reroute to the error page before the first call can rerout to the success page.

A clear and concise description of what the bug is.

To Reproduce

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

  1. Signup and wait for confirmation email
  2. Click on on confirmation email link
  3. track the auth/confirm page that is triggered
  4. See duplication as below

Expected behavior

Screenshot 2024-04-30 114157

A clear and concise description of what you expected to happen.
I expect it would only run once and not error.

Screenshots

image

If applicable, add screenshots to help explain your problem.

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

I don't have any strictmode values set true

Add any other context about the problem here.

@Taxeon Taxeon added the bug Something isn't working label Apr 30, 2024
@charislam
Copy link
Contributor

charislam commented Apr 30, 2024

Thanks for the report, @Taxeon! Which instructions are you following? I just followed all the instructions from this guide exactly in a fresh Next project. Only addition was a console log to test how many times the endpoint code runs, and I couldn't reproduce...

Screenshot 2024-04-30 at 18 25 57

@Taxeon
Copy link
Author

Taxeon commented Apr 30, 2024 via email

@charislam
Copy link
Contributor

My advice would be to try reproducing in a fresh project to rule out any problems with the tutorial as-is, then start plugging in the rest of your code in batches to see what's breaking it. Hard to get more specific without seeing the surrounding code.

If you can come up with a minimal reproduction, I'd be happy to look at it.

@encima encima added auth All thing Supabase Auth related cannot-reproduce Unable to reproduce the opener's problem after attempts to replicate labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth All thing Supabase Auth related bug Something isn't working cannot-reproduce Unable to reproduce the opener's problem after attempts to replicate
Projects
None yet
Development

No branches or pull requests

3 participants