Can't Find db-login.js

Im following the User Migration guide and under Set Up and Configuration number 8 there is a link to the github repository that errors out. Does anyone know where I can find that code?

Hi @sean.walsh ,

Welcome to the Auth0 Community!

I could access to the GitHub repository. Here is the code.

 * @param {string} email - User email address, provided on login.
 * @param {string} password - User password, provided on login.
 * @param {function} callback - Function to call when the script has completed.
function login (email, password, callback) {

  var request = require('request');
    configuration.endpointUrl + 'migration-ws-login',
      form: {
        username:     email,
        password:     password,
        access_token: configuration.migrationToken
    function(error, response, body) {

      // Error encountered during HTTP request, exit.
      if (error) {
        return callback(error);

      var wpUser = JSON.parse(body);

      // Error returned from WordPress or no data, exit.
      if (wpUser.error || ! {
        return callback(null);

      // Use WordPress profile data to populate Auth0 account.
      var profile = {
        user_id: configuration.userNamespace + '|' +,
        email_verified: true

      callback(null, profile);

Hope this helps!

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