sails-auth | based User Authentication system for sails.js applications | Authentication library

 by   trailsjs JavaScript Version: Current License: MIT

kandi X-RAY | sails-auth Summary

kandi X-RAY | sails-auth Summary

sails-auth is a JavaScript library typically used in Security, Authentication, Nodejs applications. sails-auth has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Passport-based User Authentication system for sails.js applications. Designed to work well with the sails-permissions module.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              sails-auth has a low active ecosystem.
              It has 277 star(s) with 148 fork(s). There are 13 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 59 open issues and 64 have been closed. On average issues are closed in 152 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of sails-auth is current.

            kandi-Quality Quality

              sails-auth has 0 bugs and 0 code smells.

            kandi-Security Security

              sails-auth has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              sails-auth code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              sails-auth is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              sails-auth releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed sails-auth and discovered the below as its top functions. This is intended to give you an instant insight into sails-auth implemented functionality, and help decide if they suit your requirements.
            • Creates a new Sails io client
            • Create a logger
            • Sailsocket socket .
            • Helper function to emit an event .
            • Synchronously add a script to the page .
            • A new JWWR context .
            • Generate a random token
            Get all kandi verified functions for this library.

            sails-auth Key Features

            No Key Features are available at this moment for sails-auth.

            sails-auth Examples and Code Snippets

            No Code Snippets are available at this moment for sails-auth.

            Community Discussions

            QUESTION

            How do I implement row-level permissions using blueprint routes in SailsJS 1.x?
            Asked 2019-Nov-13 at 22:19

            I'm using Sails version 1.2.3 to build rest APIs. Our application requires row-level permissions for some entities. For example, for the same API, certain users/roles the rest API should return a subset of the data. For elevated users the rest API should return the full set of data.

            Instead of build custom routes/actions for our application, I'd like to use sails blueprint routes, and apply the necessary row-level permissions to the blueprint routes.

            I've tried reviewing the sails-auth and sails-permissions npm packages, but they don't work for sails 1.x.

            Is there a way to do this in the current version of SailsJS?

            Thanks!

            ...

            ANSWER

            Answered 2019-Nov-13 at 22:19

            I agree with @mansim. But still, if you want to do this you must override the find and findOne controllers as per requirement.

            Steps should be like as follows:

            1. Create a policy that will set a permission flag in the 'req' object.
            2. Read flag from 'req' in the findOne/find method.
            3. Use _.omit(or any javascript method) to remove the details which you don't want to send.

            Source https://stackoverflow.com/questions/58773836

            QUESTION

            Unable to integrate sails-auth library in sails project
            Asked 2018-Aug-07 at 16:47

            I'm trying to add the sails-auth library to my sails app. after installation and running sails lift i get this error returned

            ...

            ANSWER

            Answered 2018-Aug-07 at 16:47

            The sails-auth library is a 3rd-party module that hasn't been updated in a few years, so it's likely not compatible with newer versions of Sails (1.0 and later). In the spot where it's failing, it's trying to use sails.getBaseUrl, which is deprecated as of Sails 1.0. (And looks like the capitalization was off to begin with: it's using getBaseurl instead of getBaseUrl with a capital "U", so it may not have worked even with older versions of Sails.)

            For built-in auth in Sails 1.0 and later, try generating a new app with: sails new foo --caviar. (You can reference an example app built with that template here.)

            Source https://stackoverflow.com/questions/50460717

            QUESTION

            sails-auth not generating models, policies etc.,
            Asked 2018-Mar-01 at 20:53

            I installed a fresh sails application, I planned to integrate passport for authentication. Sails-auth seems to be the easiest way but it just doesn't create any files as said in the doc..

            sails : 0.12.14

            I got this deprecated warning while installing sails-auth though,

            ...

            ANSWER

            Answered 2018-Mar-01 at 20:53

            You have to follow the steps explained on https://github.com/trailsjs/sails-auth

            First, do npm install sails-auth --save followed by installing a password strategy you want to use, e.g. npm install passport-google-oauth Then create the file config/passport.js with the following content according to the passport strategy you want to use, for example:

            Source https://stackoverflow.com/questions/49013878

            QUESTION

            sails-auth user table has no password field but still validates
            Asked 2017-Apr-10 at 02:31

            I just started working with sails-auth and running it from MySql. I see that the user table it automatically generated doesn't have a password field. Odd. I track down the register(?) method and see that it even deletes the password property before creating the user. So I figure that when you Post to auth/local and give it an email and password that it just checks the email exists and ignores the password (leaving it to the user to tweak this later). But when I login and enter a bad password it won't let me. I have to enter a valid password. How does it know what a valid password is when there is no password in the user table??

            Thanks.

            ...

            ANSWER

            Answered 2017-Apr-10 at 02:31

            User has 1-n relationship with Passport model, which contains password field

            Usually Ideally, credentials are stored in 1-n relationship with User model, when user can login via various methods e.g. password, OAuth etc.

            Source https://stackoverflow.com/questions/43303682

            QUESTION

            Migrating to Sails.js 0.12 - middleware migration
            Asked 2017-Feb-15 at 08:20

            I am migrating an old sails.js project which was written in 0.10.5 to 0.12.x. Since the original code was written a long time ago and may have some "non-conforming" code I decided to re-build the project by starting a new sails project and slowly migrating the models/controllers/services while keeping only necessary policies and configuration files.

            So far I managed to get the project to lift and now I am starting to deal with the authentication. Ideally, I intend to move to use passport with jwt to replace existing express-jwt.

            My old config/http.js looks like so:

            ...

            ANSWER

            Answered 2017-Feb-15 at 08:20

            Yes, you can remove the custom middleware. Latest pattern is easier to manage. For starters,

            • Access-Control-Allow-Origin can be set in config/cors.js

            • You can use passport-jwt in a more sailsy way by making use of sails-auth module. And splitting the logic into services, using policies to manage the flow etc. The problem with sails-auth is, the module in npm has been published over an year ago. It has several bugs. The GitHub repo though has stable version.

            I have made a bare minimum auth server in sails, which you can extend for various passport strategies. The server supports local, bearer, JWT strategies out of the box.

            Sails Auth Server

            Source https://stackoverflow.com/questions/42229717

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install sails-auth

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

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/trailsjs/sails-auth.git

          • CLI

            gh repo clone trailsjs/sails-auth

          • sshUrl

            git@github.com:trailsjs/sails-auth.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Authentication Libraries

            supabase

            by supabase

            iosched

            by google

            monica

            by monicahq

            authelia

            by authelia

            hydra

            by ory

            Try Top Libraries by trailsjs

            trails

            by trailsjsJavaScript

            sails-permissions

            by trailsjsJavaScript

            sails-swagger

            by trailsjsJavaScript

            trailpack-hapi

            by trailsjsJavaScript

            doc

            by trailsjsCSS