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

Cannot create / login first new user after project is up and running #23

Open
LymanBE opened this issue Apr 18, 2023 · 2 comments
Open

Comments

@LymanBE
Copy link

LymanBE commented Apr 18, 2023

Describe the bug
I'm seeing "Cannot destructure property 'user' of 'data.session' as it is null." pop up in the top right any time I try to create a user.

I can see the users being created in the auth.users schema of the test supabase project I've created for this. I also receive an email which I can try to confirm. However, it continues to fire this error every time I attempt to register a user (even if it's one I can see exists in the auth.users table already from prior attempts). Even when the email is confirmed (and I can see that the auth.users table reflects that), it still says to retry the login/password (although, it's unclear to me if the issue then is that the same user email has been attempted and is in the auth.users table multiple times).

To Reproduce
Steps to reproduce the behavior:

  1. Follow the README.md instructions exactly.
  2. Create a new Supabase project that is empty.
  3. Use the provided Supabase credentials.
  4. Run "npm run dev"
  5. Attempt to register a user.

Expected behavior
Login success or a prompt to confirm email.

Screenshots
Probably not needed.

Desktop (please complete the following information):

  • OS: MacOS w/ ARM64
  • Browser: Chrome + Safari both have this issue
  • Version: Latest of each as of the current date.

Additional context
The instructions are a little bit unclear as to the role that that Prisma db being created locally is playing as opposed to the Supabase DB. I was guessing one is dev and one is prod. However, I did try configuring the database url to be either the local prisma database or the supabase dabase url and the outcome is the same regardless.

@Ketcap
Copy link
Owner

Ketcap commented Apr 20, 2023

Hey,
Thanks for letting me know about the issue,

Can you let me know on couple things:

  • Do you have on supabase ? Do you see tables there after migration?
  • Users are registered on Database aswell not only on Supabase, would you be able to confirm that user exists on both places?
  • Prisma is used to create database which is on Supabase as well.

I'll try to reproduce with empty Supabase Project and Local db and update if neccessary. If you have any ideas we can debug together and solve faster .

@Ketcap
Copy link
Owner

Ketcap commented Apr 22, 2023

@LymanBE I'm unable to reproduce this, if you can provide me with more information that would be helpful.

I have 1 idea about it so make sure confirm email confirm is not enabled. Let me know if this solves the issue, I don't recall if this is enabled by default.

Screenshot 2023-04-22 at 20 48 34

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

2 participants