Nextauth add data to user that tries to sign up
I have my frontend where a user can signup to the website. For signing up they get a team number and a participant ID. When the user tries to login I want to add this data to my user. If the user tries to login without a valid team number/participantID then I want to block signing in in the nextauth callback.
The issue I face is that the user needs to exist in my DB before I can review if he is provided the correct information and i can't access the team number or participantID in the signin callback.
Do you know how I can make this work?
1 Reply
I don't understand, why not assign a team number and a participant ID when the user signs up?
Then when the user tries to login check if the team number or participant ID does exist.