I’m trying to auto-migrate users from my custom datastore to auth0. I have enabled the “import users to auth0”-setting and defined custom database scripts for login and get-user with the following signatures:
function login(email, password, callback)
function getByEmail(email, callback)
However, in my database, usernames are not email addresses, so I have enabled the “Requires username” checkbox:
When enabling this I get the following error in the log: DB Login Custom script: username is required, please update the import user script in the connection settings.
This makes sense, but I’m not sure exactly what part of the script I should modify? Should the method signature be changed, and if so, to what? Should the object passed in the callback function be changed?