jkuester:autoform-passwordmix

v1.0.0Published 5 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Meteor Autoform Passwordmix

JavaScript Style Guide Project Status: Active – The project has reached a stable, usable state and is being actively developed.

Check out the DEMO!

Configurable extension to provide a password input that consists of a mix of random words.

Instead of forcing users to enter complex password pattern you can now provide an input for multiple words, which increases password length and uniqueness.

Requirements and installation

This extension requires AutoForm >= 6. It works out-of-the box with Bootstrap 3 and requires no further action to also display correct using Bootstrap 4. To install the component add it via

$ meteor add jkuester:autoform-passwordmix

Configuration and usage

The extensions provides configration for

  • Show characters instead password dots (default: off)
  • Number of words required (default 3)
  • Min/Max length for each word required (default min. 4 / max. 20)
  • Insert a separator character bewteen each word (default none)
  • RegExp pattern for each word (default enable all) (tbd)
  • Whitespace stripping enabled/disabled (default off) (tbd)
  • Autojumping to next input on typing / to previous input on backspace (default off) (tbd)

A full example would therefore look like the following:

1{
2  password: {
3    type: String,
4    autoform: {
5      type: 'passwordmix',
6      words: 3,
7      min: 4,
8      max: 20,
9      regExp: /^[a-z0-9A-Z_@-\\!\\?\\.]$/, // this is just an example and not a default!
10      separator: '-',
11    }
12  }
13}

Note that when using separator (example -) the password will be like the following pattern words-with-separator and you have to provide input forms with the same separator, too.

However, the more powerful feature of the separator is to split the the password by the given char into an array and send the word array to the server, which can use it's own separator to build the "real" passwords for creating accounts or logging in.

This feature is introduced to avoid this extension to be focused around an array of words but keeping it as simple and low-throwshold as possible.

Run the examples

To run the examples locally, clone this project and cd into the example folder and use the npm sript to start:

$ git clone git@github.com:jankapunkt/meteor-autoform-passwordmix.git
$ cd example
$ meteor npm run start

If you don't use the start script it won't use your latest changes of the packages folder.

License

MIT