Cross post from my employer's development blog: http://rootinc.github.io/2016/03/16/pass-requirements-sails/
If you perform an installation of [Passport][passport] with [SailsJS][sails] using the [Sails Passport Auth Generator][sails-generate-auth] you get several files in your app already configured for you. If you then use passport-local, you will already have a complexity requirement on the password. It defaults to requiring 8 characters minimum, letters, numbers, and symbols.
What if you want to change this requirement? In the generated model file `Passport.js`, you should see a line that says `provider : { type: 'alphanumericdashed' },` and `password : { type: 'string', minLength: 6 }`. The minLength is an easy and obvious change. What about the complexity requirement though? This stumped me for a bit. There doesn’t seem to be any mention of these keywords or providers on the Passport official site, nor anything in the [Passport-local repository][passport-local]. I believe I found the answer, they appear to be ORM validations from Sails itself. You can find a list [here][validations].
For my project, I simply switched to `alphanumeric` and I no longer need symbols in my passwords. I suppose anything on the list linked above should work. I didn’t try it but I suppose you could even set it to `ipv6` and require that every user’s password be a valid ipv6 formatted address. Not sure I would recommend that though.
[passport]: http://passportjs.org/
[sails]: http://sailsjs.org/
[sails-generate-auth]: https://github.com/kasperisager/sails-generate-auth
[passport-local]: https://github.com/jaredhanson/passport-local
[validations]: http://sailsjs.org/documentation/concepts/models-and-orm/validations#/validation-rules
If you perform an installation of [Passport][passport] with [SailsJS][sails] using the [Sails Passport Auth Generator][sails-generate-auth] you get several files in your app already configured for you. If you then use passport-local, you will already have a complexity requirement on the password. It defaults to requiring 8 characters minimum, letters, numbers, and symbols.
What if you want to change this requirement? In the generated model file `Passport.js`, you should see a line that says `provider : { type: 'alphanumericdashed' },` and `password : { type: 'string', minLength: 6 }`. The minLength is an easy and obvious change. What about the complexity requirement though? This stumped me for a bit. There doesn’t seem to be any mention of these keywords or providers on the Passport official site, nor anything in the [Passport-local repository][passport-local]. I believe I found the answer, they appear to be ORM validations from Sails itself. You can find a list [here][validations].
For my project, I simply switched to `alphanumeric` and I no longer need symbols in my passwords. I suppose anything on the list linked above should work. I didn’t try it but I suppose you could even set it to `ipv6` and require that every user’s password be a valid ipv6 formatted address. Not sure I would recommend that though.
[passport]: http://passportjs.org/
[sails]: http://sailsjs.org/
[sails-generate-auth]: https://github.com/kasperisager/sails-generate-auth
[passport-local]: https://github.com/jaredhanson/passport-local
[validations]: http://sailsjs.org/documentation/concepts/models-and-orm/validations#/validation-rules
Comments
First of all, they are cheaper than the original ones,
you do not need to pay any fees when taking them online. Secondly,
it’s a great way to finally being able to afford those expensive items
you would have never thought of buying before.
Being financially independent means that you can be absolutely free from all burdens of life.
Well, it is not your fault to be born poor but the blame is yours if you die poor.
One of the ways to be affluent in life is to go in for counterfeit money.
We produce a replica of many currencies and supplies worldwide.
web link: https://bestqualitynotes.com/
https://bestqualitynotes.com/counterfeit-banknotes/
https://bestqualitynotes.com/tag/20-dollar-bills/
https://bestqualitynotes.com/tag/australian-dollars-banknotes/
https://bestqualitynotes.com/tag/best-place-to-buy-counterfeit-money-online/
Skywalk Pharma is a company specialized in sales and delivery of research chemicals products and more. With more than 15 years of experience we can proudly say that we are one of the best in business, a trusted supplier for more than 1000 customers.