I have a custom database that I’'ve configured to “migrate to auth0”. When a user signs up it gets a user_id of “auth0|undefined”. If a second user logs in it also gets the same ID… they share id some how…
The next time that first user logs in, it gets a proper user_id.
I dont understand what Im doing wrong… Any advice would be helpful.
function create (user, callback) {
request.post({
url: 'https://xxx.com/some/path/create',
json: user,
auth: {
username: "foobar",
password: configuration.auth_password
}
}, function (err, response, body) {
if (err) return callback(err);
if (response.statusCode === 401 || response.statusCode === 403) return callback(new Error("Forbidden"));
if (response.statusCode === 409) return callback(new ValidationError("user_exists", "User exists"));
callback(null);
});
}
I see that you ask for my login script. But Im concerned about the registration. Why does my user have user_id: "auth0|undefined" after they registered?