How to setup registration for next-auth credential ( Email + password ) provider? #2285
Replies: 12 comments 2 replies
-
You have to implement yourself. And use the authorize method to return the user object |
Beta Was this translation helpful? Give feedback.
-
Hi, can you show a brief example?
|
Beta Was this translation helpful? Give feedback.
-
But
what other better 'email + password |
Beta Was this translation helpful? Give feedback.
-
just return the user from authorize and it will pass the user object to jwt callback for token creation
|
Beta Was this translation helpful? Give feedback.
-
maybe passport? |
Beta Was this translation helpful? Give feedback.
-
@raymclee hi, for the is it correct that I should do something like this?
|
Beta Was this translation helpful? Give feedback.
-
yes you can do that |
Beta Was this translation helpful? Give feedback.
-
@raymclee in the |
Beta Was this translation helpful? Give feedback.
-
I think better take email and password from user input (ajax_register_post_params). The data in response should't include password |
Beta Was this translation helpful? Give feedback.
-
@yelnyaface please don't open duplicate issues, it creates overhead I answered there. |
Beta Was this translation helpful? Give feedback.
-
In one or two examples above, I saw how they're calling signin client-side function to perform login after successful registration. This shouldn't be the case. There should be a server side signin function that logs a user into the session while the request is on the server itself. Coming from Laravel, Ruby-on-rails makes me realize how much we take stuff for granted. Something that's should've been a trivial task from nextauth side, requires us to implement broken solutions. |
Beta Was this translation helpful? Give feedback.
-
How to setup registration for
next-auth
credential ( Email + password ) provider?everything I found on the web are just
Sign In
tutorials,there is totally nothing about that in the
next-auth
documentation,why there is little to no info of this at all on the web? is it so rare that nobody even knows or encounter this issue?
Beta Was this translation helpful? Give feedback.
All reactions