Closed Adstokoe19 closed 1 year ago
Hi @Adstokoe19! are you talking about the signUp
function or the sign in with a provider like a github?
Hi @Fedeya both if possible. I have a custom login page where the user can sign in with their credentials or Facebook (as a provider) and a sign up form. When the user is created in Sanity, I would like to assign them a group and role. One way to do this would be using query parameters e.g. /login?group=value&role=value /sign-up?group=value&role=value
These additional values would need to be added to the newUser
request?
@Adstokoe19 next auth have a way for set custom profile data, using the profile callback in the provider
here you can see some examples
but this lib i think is not working with that profile callback, probably I need to do a fix
and with the sign up with credentials I think is better approach get that data in the sign up function and in the body of the api route
let me know what you think 😀
@Fedeya if you could implement the profile callback into you lib that would be great! Re sign up with credentials, your suggestion sounds good. Both options will require updates to your lib?
@Fedeya any further thoughts on this? Cheers.
Hi @Adstokoe19, i created this pr #11 this should be fix the problems sending more data in the provider using the profile callback, and in the signUp function
Currently if you are creating a new user, the following fields are mapped across: 'email, name, image and password'. It would be nice if you could pass in additional values for custom schema used instead of the default user schema.