Is there an equivalent to passport-local on Grant ?
See original GitHub issueIt there an equivalent to passport-local https://github.com/jaredhanson/passport-local that allows Grant to have a local strategy for login ?
passport.use(new LocalStrategy(
function(username, password, done) {
User.findOne({ username: username }, function (err, user) {
if (err) { return done(err); }
if (!user) { return done(null, false); }
if (!user.verifyPassword(password)) { return done(null, false); }
return done(null, user);
});
}
));
I am ideally wanting to be able to provide both local login and OAuth2 based login. And want to use Grant as passport is way too cumbersome and badly coded. Grant seems a far far cleaner implementation.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Passport Alternatives - Authentication - Awesome Node.js
Passport alternatives and similar modules · everyauth · Grant · Truly a developer's best friend · passwordless · Lockit · CloudRail · Popular ......
Read more >Passport.js alternatives in 2022 : r/node - Reddit
Are there any alternatives to passport.js that aren't such a headache to work with. At this point, I'm almost considering rolling my own...
Read more >Grant vs Passport.js? [closed] - Stack Overflow
Grant is designed specifically for OAuth, whereas passport is designed for pretty much any authentication method (HTTP Basic, ...
Read more >Everything you need to know about the `passport-local ...
In this post, I am going to walk through why the passport-local authentication strategy is a simple, secure solution for small teams and ......
Read more >Vue.js Authentication System with Node.js Backend
passport-local is a library component for Passport.js. It specializes in simple authentication by using the local authentication type. For ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @AaronNGray!
Grant is only concerned with OAuth, and more specifically either OAuth1.0a or the OAuth2.0
authorization_code
grant type.You can use both Grant and some other middleware for user/pass authentication in your app.
OAuth along with OpenID Connect are used for Federated Identity, meaning that the goal is to never let your users enter their passwords directly on your server, but instead delegate that to a third-party Identity Provider.
Grant helps you to easily configure and leverage such provider(s), whether that be a third-party one, or your own, hosted somewhere on your stack. Then you have to make the decision if and how are you going to support password authentication. There are services like Auth0 that supports that out of the box.