Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this package support providing a UserInput array to zxcvbn-ts? #632

Closed
tobias-graf-p opened this issue Apr 1, 2023 · 3 comments
Closed

Comments

@tobias-graf-p
Copy link

The zxcvbn-ts lib allows to provide a UserInput array. See here: https://zxcvbn-ts.github.io/zxcvbn/guide/user-input/

Is this supported by this package?

@antoantonyk
Copy link
Owner

Hey @tobias-graf-p ,

did you try with the PSM_CONFIG provider to give these options?

@NgModule({
    ...
    imports: [
        ....
        PasswordStrengthMeterModule.forRoot()
    ],
    providers: [
      {
        provide: PSM_CONFIG,
        useValue: {
          translations: zxcvbnEnPackage.translations,
          graphs: zxcvbnCommonPackage.adjacencyGraphs,
          dictionary: {
            ...zxcvbnCommonPackage.dictionary,
            ...zxcvbnEnPackage.dictionary,
             userInputs: ['someEmail@email.de', 'someUsername'],
          },
        }
      }
    ],
    ....
})
export class AppModule { }

@tobias-graf-p
Copy link
Author

tobias-graf-p commented May 7, 2023

@antoantonyk Thanks for your reply. Your suggestion would use the same values for all users, wouldn't it? But we would be able to pass the user-specific values whenever we check a password ...

Anyway, meanwhile we used zxcvbn-ts directly and implemented our own password strength meter. So it is not relevant for us anymore. If you like, you can close this issue.

@antoantonyk
Copy link
Owner

@tobias-graf-p yes. you are right. We don't support per user. Glad you have found another solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants