Hi,
I would like to connect my own database to Auth0 with this database action script:
function login(email, password, callback) {
const msg = 'Error: Check login.py script';
const fetch = require('node-fetch');
const options = {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json;charset=UTF-8",
},
body: JSON.stringify({ email: email, password: password }),
};
fetch( configuration.server_url + "api-token-auth/", options).then((res) => {
if (res.status === 200) {
return callback(null, {user_id: email});
}
else {
return callback(new Error(msg));
}
});
}
My question is, is it possible to add the user’s email to the callback URL?
Thanks.