[ConvexAuth]: additional fields passed to signIn, added to user document?
Hello,
Is there a way to pass additional sign up values passed to
signIn
from useAuthActions
like for example, here when i sign up my user, i let them define a name in my signup component.
I'm unsure where to get the name from, since its not passed to args.profile etc?
9 Replies
Looking at the source, it seems to accept a params object
Still looking
Yeah in the example code you pasted there,
name
should be present in args
of createOrUpdateUser
I think?
There's also a new afterUserCreatedOrUpdated
event hook that you can use to preserve the existing behavior and just patch afterward, in case that's helpful.Advanced: Details - Convex Auth
Authentication library for your Convex backend
I've tried looking all through the args, and nothing seem to indicate there being whatever is passed along aditionally to
email
args.profile only has:
But i might go ahead and give that new callback a try, and see if that gets the data any differentlyYeah it may not work the way I was thinking. Here's an active GitHub discussion validating this problem exists: https://github.com/nextauthjs/next-auth/discussions/901
GitHub
How can I pass additional parameters to signIn() function? · nextau...
Your question How can I pass additional parameters to signIn with email function to use on callback? Cant find passed values on the sign in callback What are you trying to do Im trying to add an ad...
(nextauth is the repo for auth.js)
Ahh cool, will take a look. I might just split the signup / complete user info into 2 seperate flows for now, to work around this problem
This was the problem solver:
https://labs.convex.dev/auth/config/passwords#customize-user-information
Totally went past me, even looking at the docs multiple times 🤦♂️
Passwords - Convex Auth
Authentication library for your Convex backend
Ah, good find!
I haven't used password auth yet, good to know
I'm facing this issue. Where did you declare or import your CustomPassword.ts file?
@oscklm