{"id":13591999,"url":"https://github.com/trailsjs/sails-auth","last_synced_at":"2025-12-17T00:20:10.300Z","repository":{"id":20668133,"uuid":"23950745","full_name":"trailsjs/sails-auth","owner":"trailsjs","description":"Passport-based User Authentication system for sails.js applications. Designed to work well with the sails-permissions module.","archived":false,"fork":false,"pushed_at":"2018-12-25T14:47:37.000Z","size":219,"stargazers_count":266,"open_issues_count":60,"forks_count":140,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-21T18:07:46.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.org/package/sails-auth","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trailsjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-12T07:17:30.000Z","updated_at":"2024-09-27T15:38:14.000Z","dependencies_parsed_at":"2022-09-05T07:50:32.050Z","dependency_job_id":null,"html_url":"https://github.com/trailsjs/sails-auth","commit_stats":null,"previous_names":["tjwebb/sails-auth"],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Fsails-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Fsails-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Fsails-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailsjs%2Fsails-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailsjs","download_url":"https://codeload.github.com/trailsjs/sails-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246290648,"owners_count":20753730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:01:04.657Z","updated_at":"2025-12-17T00:20:10.073Z","avatar_url":"https://github.com/trailsjs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# sails-auth\n\n[![Looking for maintainers][hacktober-image]][hacktober-url]\n\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Dependency Status][daviddm-image]][daviddm-url]\n\n[Passport](http://passportjs.org/)-based User Authentication system for Sails.js applications.\n\n## 1. Install\n```sh\n$ npm install sails-auth --save\n```\nThis will install `sails-auth` as a Sails Hook. The Hook uses\n[marlinspike](https://github.com/tjwebb/marlinspike) to inject the relevant\nControllers, Policies, etc into your Sails application.\n\n## 2. Configure\n\n#### `config/passport.js`\n\nBy default, the `local` and `basic` strategies are enabled. See\n[config/passport.js](https://github.com/langateam/sails-auth/blob/master/config/passport.js)\nfor examples of how to add and configure additional authentication strategies.\n\n#### `config/auth.js`\n\n```js\n  bcrypt: {\n    /**\n     * Specifiy number of salt rounds to perform on password. Values \u003e10 are\n     * slow.\n     */\n    rounds: 8\n  }\n```\n\n## 3. Authenticate!\n\nCreate users as you normally would (`POST` to `/user`). Authenticate using the endpoint of the provider you've chosen.\n\n#### Local\nAuthenticate with the local strategy via a `POST` to `/auth/local` with params\n`identifier` (email) and `password`). This will also create a session. See [passport.local](https://github.com/jaredhanson/passport-local) for more.\n\n#### HTTP Basic and Digest\nSee [passport.http](https://github.com/jaredhanson/passport-http).\n\n#### Additional Passport Strategies\n- [passport.google](https://github.com/jaredhanson/passport-google-oauth)\n- [passport.twitter](http://passportjs.org/guide/twitter/)\n- [passport.github](https://github.com/jaredhanson/passport-github)\n- [passport.facebook](http://passportjs.org/guide/facebook/)\n- et al\n\n#### `/user/me`\nReturns `User` for this authenticated session.\n\n## Permissions\nFor comprehensive user account control with role-based permissioning, object ownership, and row-level security, see [**sails-permissions**](https://github.com/langateam/sails-permissions), which uses this project as a dependency.\n\n## License\nMIT\n\n## Maintained By\n[\u003cimg src='http://i.imgur.com/Y03Jgmf.png' height='64px'\u003e](http://langa.io)\n- [Travis Webb](https://github.com/tjwebb)\n- [Ryan Quinn](https://github.com/ryanwilliamquinn)\n- [Contributors](https://github.com/langateam/sails-auth/graphs/contributors)\n\n[npm-image]: https://img.shields.io/npm/v/sails-auth.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/sails-auth\n[travis-image]: https://img.shields.io/travis/langateam/sails-auth.svg?style=flat-square\n[travis-url]: https://travis-ci.org/langateam/sails-auth\n[daviddm-image]: http://img.shields.io/david/langateam/sails-auth.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/langateam/sails-auth\n[hacktober-image]: http://i.imgur.com/FM9yVCI.png\n[hacktober-url]: https://twitter.com/langateam/status/782995392212369408\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailsjs%2Fsails-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailsjs%2Fsails-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailsjs%2Fsails-auth/lists"}