Giter Club home page Giter Club logo

antoantonyk / password-strength-meter Goto Github PK

View Code? Open in Web Editor NEW
59.0 3.0 30.0 17.6 MB

To display the strength of the password with a visual feedback. PasswordStrengthMeter use zxcvbn to estimate the strength of the password and also provide a visual feedback with suggestions and warning messages.

Home Page: https://antoantonyk.github.io/password-strength-meter/

License: MIT License

JavaScript 6.86% TypeScript 82.32% HTML 6.24% SCSS 4.58%
angular angular6 password-meter angular8 angular10 angular9

password-strength-meter's People

Contributors

antoantonyk avatar dependabot[bot] avatar hosseinsalmanian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

password-strength-meter's Issues

Use different zxcvbn fork

Continuation of #24:

npmjs.com/zxcvbn3 doesn't appear to be actively maintained, it currently points to github.com/hrueger/zxcvbn which is "1 commit ahead, 59 commits behind zxcvbn-ts:master". That single commit (diff) is adding this line to README.md:

⚠ Moved to https://github.com/MrWook/zxcvbn

github.com/MrWook/zxcvbn in turn, is "1 commit ahead of dropbox:master", and that single commit (diff) is modifying README.md to link to github.com/zxcvbn-ts/zxcvbn.

... Which looks considerably more "alive" (here's snyk.io's take).

NPM: https://www.npmjs.com/package/@zxcvbn-ts/core
Migration guide: https://zxcvbn-ts.github.io/zxcvbn/guide/migration/
Repo: https://github.com/zxcvbn-ts/zxcvbn

PS: The creators of those first two forks (hrueger, MrWook) have also contributed to zxcvbn-ts/zxcvbn, as per this comment.
PPS: Opened PRs to clarify the situation: 1, 2.

Uneven strength bar widths

I had to add this to my container

::ng-deep .strength-meter {
    &::before,
    &::after {
      box-sizing: border-box;
    }
  }

Please add accessibility aria-label and title property

Hello,

I am using this component on my project, and I need to add aria-label and title to fulfill the accessibility requirements for my customers. I see that there are aria-min, and aria-max, can you also add these two properties with them? I really appreciate any help you can provide.

How to get rid of "not found" printing in console

Hi,

I was able to implement the plugin successfully in my angular app, and I have disabled the feedbacks, However I still see the browser keeps printing out "not found" .. My initial check is this happens while trying to translate the feedbacks (although of I disabled it).

Any thoughts how can I stop this ?

How to customize background?

i need to change the background color #DDD to #FFF but I can't access the .strength-meter class that contains the background color.

Internationalization and optional configs

Hi, thanks for your great lib. I did some refactoring and upgraded to latest angular. I switched from zxcvbn to @contentpass/zxcvbn, to add the possibility for internationalization and optional config. If you're interested to those changes I can make a PR for you. Let me know anything.

Weirdness after update

Just bumped from 3.0.1 to 4.3.0

Any idea why/where this is manifesting?

NullInjectorError: R3InjectorError(AppModule)[IPasswordStrengthMeterService -> IPasswordStrengthMeterService -> IPasswordStrengthMeterService]:
NullInjectorError: No provider for IPasswordStrengthMeterService!

Must import into AppModule - error when importing into other modules.

I have a lazily loaded route, 'register', that is the only one to use the password-strength-meter. As such, I added the PasswordStrengthMeterModule to the RegisterModule's list of imports. When I navigate to the register route however, I get the following error:

core.mjs:7640 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(AppModule)[IPasswordStrengthMeterService -> IPasswordStrengthMeterService -> IPasswordStrengthMeterService]: NullInjectorError: No provider for IPasswordStrengthMeterService! NullInjectorError: R3InjectorError(AppModule)[IPasswordStrengthMeterService -> IPasswordStrengthMeterService -> IPasswordStrengthMeterService]: NullInjectorError: No provider for IPasswordStrengthMeterService!

I'm only able to fix it by importing the PasswordStrengthMeterModule in both the AppModule and the RegisterModule. I should only need to register it in the RegisterModule.

Need 3 strength meters

Hi,

I only need three(3) strength meters. Is there any way to achieve that?

Thanks in advance.

zxcbn3 : tolowercase is not a function

Running angular password stength meter in my ionic app. Gives a uncaught promise error where it says that toLowerCase is not a function when converting the password to lowercase in zxcbn3.

Remove hard dependency to zxcvbn modules

Hi
As we provide our own implementation for IPasswordStrengthMeterService, there is no need to default PasswordStrengthMeterService.
but because imported PasswordStrengthMeterService is the default provided class in PasswordStrengthMeterModule forRoot method, there is a hard dependency on zxcvbnEnPackage.
it makes the final app bundle about 1MB larger.
I think it would be better to remove the default provider for IPasswordStrengthMeterService and let it be specified in the consumer app module. it will remove the hard dependency on "zxcvbn" Module and the final bundle will be much smaller.
thanks in regards.

Multiple feedback suggestion format issue

In the case where multiple feedback suggestions are returned from zxcvbn. They are not formatted with spaces between.

In the case below 2 feedback suggestions are returned Add another word or two. Uncommon words are better. and Avoid repeated words and characters. No space is appended between those.

Screen Shot 2021-05-25 at 2 56 52 PM

Update peer dependencies to Angular 10

Angular 10 has been out for a while now, could you please update the peer dependencies? I get the following message.

npm WARN [email protected] requires a peer of @angular/common@~9.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@~9.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of tslib@^1.10.0 but none is installed. You must install peer dependencies yourself.

tslib is now at version 2+, so you should probably update that too

Thank you!

Provide PasswordStrengthMeterService in root

The password service is particularly useful even outside the scope of the component - for example, for custom validators. I think that it should be exposed even if the component is not rendered, via DI.

Providing it in the root injector would help alot.

Password warning message sentence, punctuation.

Can you please update the warning message so that there is correct punctuation and spacing, as it does not look very good when we are telling someone that their password is not good enough.

Ideally we should be able to customise these, but in the meantime please can you fix the below

This is a top-10 common passwordAdd another word or two. Uncommon words are better.

Am I doing something wrong?

When using the demo page for this component I tried using entering password and password123, the latter came back as a "green" password. This is a really common password, how comes the strength isn't lower?

If I do the same thing using: https://lowe.github.io/tryzxcvbn/, then this comes back with a score of 0.

Output from above:

_> password: | password123

guesses_log10: | 2.77525
score: | 0 / 4
function runtime (ms): | 0
guess times:
100 / hour: | 6 hours | (throttled online attack)
10  / second: | 60 seconds | (unthrottled online attack)
10k / second: | less than a second | (offline attack, slow hash, many cores)
10B / second: | less than a second | (offline attack, fast hash, many cores)
warning: | This is a very common password
suggestions: | - Add another word or two. Uncommon words are better._

Is this something that can be configured within the component?

Evaluate alternative npm packages to zxcvbn?

The npm dependency "zxcvbn" was last published 4 years ago. It's written as CommonJS and AMD modules using coffeescript, and it doesn't seem to be maintained anymore.

An issue with CommonJS and AMD is that it's harder for transpilers to optimize the code. Now that we have native modules in javascript, we should use it. For example, in my Angular 10 project, I get the following message when I build it:

WARNING in C:\Projects\OceanCloud\ClientWebService\FrontEnd\node_modules\angular-password-strength-meter_ivy_ngcc_\fesm2015\angular-password-strength-meter.js depends on 'zxcvbn'. CommonJS or AMD dependencies can cause optimization bailouts.

See the following issue: dropbox/zxcvbn: Still maintained? #290

Github user hrueger has created his own fork of zxcvbn using plain ES2015 modules. You can find the source code here and the npm package here.

Publish Ivy distribution

Whenever I build my Angular (13) application, it reports that password-strength-meter is a legacy "View Engine" library and the library authors should be encouraged to publish an Ivy distribution.

Hence, this ticket. :-)

⠙ Generating browser application bundles (phase: setup)...Processing legacy "View Engine" libraries:
- angular-password-strength-meter [es2015/esm2015] (https://github.com/antoantonyk/password-strength-meter.git)
Encourage the library authors to publish an Ivy distribution.
✔ Browser application bundle generation complete.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.