justchrister / kalt

Make money, make a difference

Home Page:https://ka.lt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error handling: sign-up: if user exists throw error

justchrister opened this issue · comments

Currently it goes to the lobby

Solution:

  • Create table user_ids that only has the user_id of all users, where anyone can look up
  • Add trigger and function to copy from the auth.users table
  • If exists, redirect to signin and give error ":O you tried signing up with an account that already exists"
  • Prefill the email field in sign-in form