-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support easier insertion of required data during account creation #73
Comments
From reading your Discord messages, it sounds like this won't directly help, but if you're using password authentication you can customize what gets populated into the https://labs.convex.dev/auth/config/passwords#customize-user-information Do note that up through version 0.0.73, if you customize |
I've run into an issue that could benefit from some better DX. (Originally posted on Discord)
I'm adding roles to my user table, and I'd like to make the "role" column required. When a user signs up, they'll be given the "user" role by default.
Following the docs, I can insert data using
afterUserCreatedOrUpdated()
pretty easily, but it only works if "role" isv.optional()
. That's not the worst, but I'd prefer to make it required.I could use
createOrUpdateUser()
to insert the data before creation, but I need to rewrite a bunch of boilerplate logic that the library is already providing just to add one extra field.It'd be awesome to be able to hook into different points in the user creation flow while still relying on the default creation logic where it doesn't need changing.
Thanks for creating Convex Auth, really enjoying it!
The text was updated successfully, but these errors were encountered: