i am connecting my localhost to Auth0 server with ngrok.exe with 443 port.
as i am using own db with Auth0 try click and this message came "“getaddrinfo ENOTFOUND https://1f121fc7.ngrok.io https://1f121fc7.ngrok.io:3306"”.
function login(email, password, callback) {
const mysql = require(‘mysql’);
const bcrypt = require(‘bcrypt’);
const connection = mysql.createConnection({
host:‘https://1f121fc7.ngrok.io’,
user: ‘root’,
password: ‘’,
database: ‘dbname’
});
connection.connect();
const query = ‘SELECT id, email FROM users WHERE email = ?’;
connection.query(query, [ email ], function(err, results) {
if (err) return callback(err);
if (results.length === 0) return callback(new WrongUsernameOrPasswordError(email));
const user = results[0];
bcrypt.compare(password, user.password, function(err, isValid) {
if (err || !isValid) return callback(err || new WrongUsernameOrPasswordError(email));
callback(null, {
user_id: user.id.toString(),
email: user.email
});
});
});
}
what is wrong in it. plz answer it ASAP. Thanks. I have development env.