Skip to content

Releases: robophil/sails-hook-jsonwebtoken

Stable Release

30 Mar 14:32
Compare
Choose a tag to compare
  1. Multiple account type
  2. Email or Username authentication
  3. Password Reset
  4. Api's exposed in JwtService
  5. New policies for validation of different accountType

Multiple account type

05 Feb 17:28
Compare
Choose a tag to compare

Changes

Creation of account is done by a service. JwtService.createUser
On signup, an accountType attribute of user is automatically added to the new user, more types can be added to that user so as to allow more multiple access/user type eg admin or normal user. The accountType is a one to many association so a user can be an admin, a manager and more. This roles can be added, updated, removed, similar to what is done by sails permission here.

A helper method to add, update & remove accountType attributes would be added in the next release.

changed bcrypt to bcryptjs

23 Jan 15:28
Compare
Choose a tag to compare

Issues face when installing bcrypt for some users
Changed bcrypt to bcryptjs.
bcryptjs is slightly slower (2.5 secs), but eliminates npm install error from bcrypt