getPasswordStrength

client.getPasswordStrength(
    clientId: string,
    password: string
)

About this command

Check the strength of a user’s password.

Examples

client
  .getPasswordStrength(clientId,password)
  .then(PasswordStrength => {
    // Display strength of password
  })
  .catch(err => console.error(err))

Parameters

password string

The user’s password.

clientId string

The ReachFive client ID.

Response

Type: Promise<PasswordStrength>

PasswordStrength

score integer

An integer representing the strength of a password.

score values
  • 0 : very weak risky password. (guesses < 10^3)

  • 1 : weak protection from throttled online attacks. (guesses < 10^6)

  • 2 : average protection from unthrottled online attacks. (guesses < 10^8)

  • 3 : strong moderate protection from offline slow-hash scenario. (guesses < 10^10)

  • 4 : very strong strong protection from offline slow-hash scenario. (guesses >= 10^10)