Replies: 1 comment
-
@balazsorban44 Hey could you help me out here please? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
I have an auth system where the user needs to sign up using their username, email and password. After clicking signup on a button on a sign up modal, their data is posted to the backend to save to the db, and then they're redirected to another page considering their logged in.
This does not actually log them in, however, it just posts the data to the backend. Hence why I'd like to use next-auth.
This is my [nextauth].ts file:
(you might notice that my
signIn
andsignOut
pages are set to/
, since my users can only sign in/out using a modal, there is no page, this modal is opened when they click a button. I am not sure if this is the right way to do it.)What I have come up with right now is to post the data of the user on the sign up modal, then call the
signIn
function from next-auth using the credentials provider. Like so:The user is required to sign in with just their email and password.
I don't know if this is the correct approach to a system like this but please let me know, thank you.
How to reproduce ☕️
This is more of a question regarding the usage of the library than a bug so my repro steps might not be clear. Any additional information you need, I'm willing to provide.
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions