I am using my own database and only want to use Auth0 for allowing users to login. Do not want to migrate my users here also. So for this I am trying to write a login script but it always returns “Wrong email or password”
My login script is like this :
function login(email, password, callback) {
const requestPromise = require('request-promise-native');
const options = {
uri: 'http://**.**.**.**/vendor/login_vendor',
json: true,
method: 'POST',
body: {
"username": some_user_name,
"password": user_password
}
};
let vendor_token = undefined;
await requestPromise(options)
.then((body) => {
vendor_token = body.token;
})
.catch(err => {
vendor_token = 0;
// console.log(err);
});
const msg = 'Please implement the Login script for this database connection ' +
'at https://manage.auth0.com/#/connections/database';
return callback(new Error(msg));
}
And I know that username/password is not wrong, also that api call I am making works fine on Postman