Welcome to the Auth0 Community!
Thank you for posting your question. We have an excellent knowledge solution for determining the user signup → Identify Sign Up Event in Post Login Action. From this point, you only need to change the API update to connect with your Mongodb. I hope this will help you!
Thanks
Dawid