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

Problem with PKCE and generateLink() #278

Open
lukaszflorczak opened this issue Sep 27, 2023 · 4 comments
Open

Problem with PKCE and generateLink() #278

lukaszflorczak opened this issue Sep 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@lukaszflorczak
Copy link

lukaszflorczak commented Sep 27, 2023

Version

@nuxtjs/supabase: v1.1.2
nuxt: v.3.6.5

Problem description

Hi, I attempted to update my authentication flow to include PKCE, but I've encountered an issue during the registration and email confirmation process.

Some details about my implementation:

  1. I disabled the redirect option, because I had implemented my own middleware to manage the necessary redirects.
  2. For user registration, I utilize a local API endpoint to generate a link and send a confirmation email via Postmark, as demonstrated in the code snippet below:
await client.auth.admin.generateLink({ type: 'signup', email, password, redirect_to })

Here's the problem: When I click the confirmation link with PKCE enabled, the user is redirected to my verification page, but they are not automatically logged in. I can see all the tokens and parameters in the URL, but the user session is not established. I also attempted to redirect the user to the callback page, but the result remains the same.

Is there something I might be overlooking or is there a configuration issue causing this behavior?

@lukaszflorczak lukaszflorczak added the bug Something isn't working label Sep 27, 2023
@devbrains-com
Copy link

Same here, any suggestions?

@ThibaultBarolat
Copy link

I'm facing the same issue.

@bart
Copy link

bart commented Nov 21, 2024

Unfortunately this is a known issue discussed in supabase/auth-helpers#610
Maybe this helps you: https://catjam.fi/articles/supabase-generatelink-fix

@lukaszflorczak
Copy link
Author

lukaszflorczak commented Nov 22, 2024

You can also check this solution. It's related as I remember: #397 (comment)

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

4 participants