rnadler / ng2-password-strength-bar

Angular 2/4/5 Password Strength Bar
http://bobonmedicaldevicesoftware.com/blog/2016/12/09/publishing-an-angular-2-component-npm-package/
MIT License
20 stars 17 forks source link

Password combination to ratch normal state #24

Closed lzielinski03 closed 5 years ago

lzielinski03 commented 5 years ago

Is there a way to reach the normal state? I try a different combination, but none is normal, is this the default behavior?

thanks.

rnadler commented 5 years ago

@lzielinski03, What do you mean by "normal state"? Are you having trouble getting a password to the strength of 4 (all green)?

lzielinski03 commented 5 years ago

imagen In this example, i get Useless: '12345' Weak: '12345qw' Normal: ????? Strong: '12345qw!' Based on strength label from docs (v1.2.1) there is a normal state.

strengthLabels (type: Array, optional)

(New in v1.2.1)

The variable can be used to define a strength label that will be appended to the colored bars.
This must be an Array of 5 strings.
For example:

public strengthLabels = ['(Useless)', '(Weak)', '(Normal)', '(Strong)', '(Great!)'];

I having trouble getting a password to the strength of 3. (normal)

Thx for support!

rnadler commented 5 years ago

Found that the original strength algorithm was poor and was causing Normal (2) not to show up. Updated with an improved algoritm that gives a much better strength distribution (see pw_strength_test.js):

Testing 50000 passwords
OLD: { '0': 15704, '1': 380, '2': 0, '3': 5893, '4': 28023 }
NEW: { '0': 3575, '1': 6105, '2': 13319, '3': 10654, '4': 16347 }

@lzielinski03 Thanks for discovering this! This fix will be in v1.2.3.

lzielinski03 commented 5 years ago

Thanks you, now its working fine!

<3