Registering user against custom database connection with auto-migration doesn't work

So the I’ve been reading the documentation on this: Get User Script Templates and it says for legacy authentication any operation such as create user, change email etc with fire this script. We don’t want legacy authentication, only the ability to migrate users across.

So here are my findings: If I simply return the callback directly without any custom code using this script: function getUser(email, callback) { // TODO: implement your script return callback(null); } I get the following response { "error": "access_denied", "error_description": "Cannot read property 'email' of undefined" } and the log Failed Login with error ‘Cannot read property ‘email’ of undefined’. But the user is created.

Next if I simply have no script I get Failed Signup with error ‘Invalid response code from the auth0-sandbox: HTTP 400. Unexpected token )’ and no user gets created.

I also followed this guide: Configure Automatic Migration from Your Database and swapped out the GetUser action script with the one described once migration is complete and get the same access_denied error.