Internet Connection Lost error during login error

I’m using the customized universal login and I want an error message with internet connection lost to appear during login I found here

‘lock.network’ option but I’m not sure of its usage can you tell me when it is triggered? and if there is any other option to do that

Hi @mariam.kamel,

When you customize the Classic Universal Login, you can pass a languageDictionary to the lock configurations like this:

// Examples of customized error messages in the languageDictionary option
var options = {
  languageDictionary: {
    error: {
      login: {
        "lock.invalid_email_password": "Custom message about invalid credentials",
        "lock.network": "Custom message indicating a network error and suggesting the user check connection",
        "lock.unauthorized": "Custom message about a failure of permissions",
        "too_many_attempts": "Custom message indicating the user has failed to login too many times."
      },
      signUp: {
        "invalid_password": "Custom message indicating a password was invalid",
        "user_exists": "Custom message indicating that a user already exists"
      }
    }
  }
};

// Initiating our Auth0Lock
var lock = new Auth0Lock(config.clientID, config.auth0Domain, options);

lock.network will be thrown when the Auth0 server can’t be reached during login due to a network error.

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