You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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" is v.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:
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 users table:
Do note that up through version 0.0.73, if you customize profile with the Password provider, you need to do any password validation that you require in profile as well. In subsequent versions, password validation will be controlled separately.
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: