Atlas email/password with confirmation and custom data


Right now in my nextjs app I am using email/password auth from Atlas.
On registration I collect extra user data such as name and birthdate.
Now that I disabled automatic email verification, the user needs to be confirmed and the onUserCreation Atlas function doesn’t execute after submitting the register form and the custom data gets lost.
I have tried saving the data in local storage but if the user doesn’t immediately login and clear the browser, or logs in for the first time on a different device, the custom user data is also lost.
Are there any suggestions on how to make sure I can confirm the user in a reliable way, while at the same time having the custom user data?


Hi Stef!
When I did my teste, I have noticed that the onUserCreation realm function works whe user log in the first time. So I personnally save the custom data in the app intern memory until the user log in for the first time. Then I send the custom data in the user’s collection.

1 Like