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

Example signUp() function leaks private information. #382

Open
k-thornton opened this issue Nov 7, 2024 · 0 comments
Open

Example signUp() function leaks private information. #382

k-thornton opened this issue Nov 7, 2024 · 0 comments

Comments

@k-thornton
Copy link
Contributor

In the documentation, it specifies that signUp() intentionally returns fake user data in the event that someone tries signing up with an already confirmed email address.
https://supabase.com/docs/reference/javascript/auth-signup

Note that it only works this way if email + sms confirmations are set up.

This is presumably to prevent someone from going to your signup page and using it to deduce who your users are.

in this code:
https://github.com/vercel/nextjs-subscription-payments/blob/main/utils/auth-helpers/server.ts#L198
it seems to intentionally override this obfuscation, where the logic now leaks your users info.

I think the correct route would be to ignore this check and send the user the "please verify your email" success message regardless. At the very least, it's worth a comment here saying that it's something users may want to update as they go into production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant