Ngrok Custom Database connection via Login Action Script

I’m trying to test my login action script for migrating users on a localDB via ngrok, but auth0 seems to be prepending port 3306 for me. Is there a way to stop this from automatically being prepended to my configuration.DB_HOST? So when I test the connection via the “try” button, it trys to reach out to whatever I have stored in configuration.MYSQL_HOST, which is my ngrok url pointing to my local tcp connection, and somehow the action script prepends the 3306. So the end result of what it trys to connect to, looks something like but is already pointing to that port on my computer, so auth0 reads it as :3306:3306

Here’s my login action script:

  console.log("starting script");
  var connection = mysql({
    host: configuration.MYSQL_HOST,
    user: configuration.MYSQL_USER,
    password: configuration.MYSQL_PASSWORD,
    database: configuration.MYSQL_DB


  var query = "SELECT id, email, password " +
    "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));
    var user = results[0];, user.password, function (err, isValid) {
      if (err) {
      } else if (!isValid) {
        callback(new WrongUsernameOrPasswordError(email));
      } else {
        callback(null, {


Hey there @MrBoutte! I am currently looking into this with our support team but in the mean time will you DM me your tenant name when you get a chance? Thanks!

After talking with our support team, they recommend trying setting the port value in mysql options to 80 or 443. Please let me know if you have any questions!

I wanted to follow up with you this morning and see if you had any additional questions on this front @MrBoutte? Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.