2.1.1 • Published 7 years ago

sails-auth v2.1.1

Weekly downloads
98
License
MIT
Repository
github
Last release
7 years ago

auth

NPM version Build status Dependency Status

Passport-based User Authentication system for Sails.js applications.

Note: For comprehensive user account control with role-based permissioning, object ownership, and row-level security, see sails-permissions, which uses this project as a dependency.

This package was last updated in 2015. For the most up-to-date information on auth and permissions in Sails, visit the official Sails website.

1. Install

$ npm install sails-auth --save

This will install sails-auth as a Sails Hook. The Hook uses marlinspike to inject the relevant Controllers, Policies, etc into your Sails application.

2. Configure

config/passport.js

By default, the local and basic strategies are enabled. See config/passport.js for examples of how to add and configure additional authentication strategies.

config/auth.js

  bcrypt: {
    /**
     * Specifiy number of salt rounds to perform on password. Values >10 are
     * slow.
     */
    rounds: 8
  }

3. Authenticate!

Create users as you normally would (POST to /user). Authenticate using the endpoint of the provider you've chosen.

/user/me

Returns User for this authenticated session.

Passport Protocols

License

MIT

Maintained By

50.0.0

7 years ago

2.1.3

9 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.0

9 years ago

2.0.0-alpha2

9 years ago

2.0.0-alpha1

9 years ago

1.3.1

9 years ago

1.2.7

9 years ago

1.2.6

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.2

10 years ago

1.1.0

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

1.0.0-rc3

10 years ago

1.0.0-rc2

10 years ago

1.0.0-rc1

10 years ago

0.11.7

10 years ago

0.11.6

10 years ago

0.11.5

10 years ago

0.11.4

10 years ago

0.11.3

10 years ago

0.11.2

10 years ago

0.11.1

10 years ago

0.11.0

10 years ago

0.10.17

10 years ago

0.10.16

10 years ago

0.10.15

10 years ago

0.10.10

10 years ago

0.10.9

10 years ago

0.10.8

10 years ago

0.10.7

10 years ago

0.10.6

10 years ago

0.10.5

10 years ago

0.10.3

10 years ago

0.10.2

10 years ago

0.0.0

10 years ago