Closed visualcohol closed 9 months ago
What error are you getting?
Based on the attached YouTube video, the error is:
You seem to have 2 user tables?
The tutorial said, I need 3 tables - user, user_key, user_session - I added an extra username field, when I started to work with the signup, an error told me I need to create a auth_user table, or else. So which table is redundant?
You need a user, key and session table - 3 total listed in the docs. How you name them is up to you, assuming you're using the postgres()
adapter
Oh, my mistake - I was following the main page tutorial for naming tables ("user"), but the postgres adapter docs user field is named differently ("auth_user"), so I mixed up things. Thanks!
Package
lucia-auth
Describe the bug
I followed the tutorial "Sign in with username and password" - created the DB tables, created an extra table for the additional field, and when I try to programmatically create a user it creates a foreign key error. It basically doesn't insert the user ID into the user table first, so everything else fails. If I manually copy the user ID over to user table, it works.
Im using hyper-express as the server and postgressql 16 as DB
thanks
https://youtu.be/gpNINYItckk