Auth0 Home Blog Docs

Automatic User Migration with Custom Database


#1

I’m testing this flow.
If my current user does not have a valid email address, how can I make the user authenticate with my custom database, and I’ll have them resolve their email after the user enters our application later.

The Database Action Script for Login, only check by username, and password, and I’m returning
user_id, username, nickname, given_name, family_name

Or the only way, is to use current authentication technique, then make the user resolve their profile issue, then use a management api to create the user.


#2

Maybe, I can create a fake email address first, then let the user update their email address after they get in (then I can use the ManagementApi to update the email address)?


#3

@arts yes your idea is the way I’d go. One point though, you must ensure all the emails you generate are truly fake and on a domain you own to mitigate the possibility of someone registering for those emails and then performing a pwd reset. Then of course, the obvious would be to make sure your email server/provider doesn’t physically send emails to those autogenerated email lists.