I'm new to Sails.js and stumbled across JWT module called Waterlock. At a glance, it has local and social authentication which are what I'm looking for, which is nice.
However I wonder if this module is production-ready. The last update in Github was long ago and being unmaintained.
If it isn't, is there any production-ready JWT module which does similar to Waterlock available for Sails.js?
Go with Passport.js, Which is stable and if you stuck anywhere there is large community.
Authentication and Permissioning with Sails + Passport
Implement Passport.js authentication with Sails.js
Related
I am new to Node Js and Currently working on a project with Express Js. I discover that User and can be achieved either through the Passport library or JSONWebTokens(JWT). So i was wondering which is the better option and why?
You can actually use them together. However, in short, passport is a module with many 'strategies' to help you authenticate users with multiple platforms. Passport-JWT is a strategy you could use as the auth strategy. This makes it easy when you use multiple ways to authenticate with your application. E.g. google, facebook, jwt, etc.
I am looking for a secure Metamask Login library that seamlessly fits into the "hackathon starter project".
Since I haven't found anything useable and i'm personally not confident to just start writing my own passport strategy it would be nice if someone more experienced than me can direct my efforts.
There's no need to roll your own - there's already an existing Metamask strategy for Passport [1].
[1] https://github.com/jgostylo/passport-metamask
I'm building an API using Nodejs/express and exploring different ways to implement authentication/authorization.
I've come across two packages which seem to do similiar things:
Passport with jwt strategy
and
jsonwebtoken
I really don't understand the difference between the two, but passport seems a lot more complicated. I know these kind of questions generally don't fair well on stack-overflow but i genuinely don't understand the difference between the two but it seems passport is generally better received? Can somone explain whether or not these packages truly accomplish the same goal or if there's a reason to use one over the other?
Thanks.
Passport is "Passport is authentication middleware for Node.js. Extremely flexible and modular" as they say it has lot's of strategies among that passport-jwt is one.
What Passport did is they brought all the different strategies together like google-auth Facebook-authentication local-authentication and so on .
jsonwebtoken is a strategy same as passport-jwt but it is individual & passport is group of strategies .
In my opinion you should learn passport as learning it you can use all kinds of strategies.A strategy is type of authentication .
Pardon me for my english hope you get it
I am wondering why I cannot find any AOR and passport auth code online? I found a ton of keystone and passport though... Is there a specific reason for that - the two should work well together, right?
You're right, there is no reason admin-on-rest would not work with passport -- however, there is a caveat:
It seems you are searching for a "passport + AOR" tutorial or guide, but one of the selling points of admin-on-rest is that it is truly agnostic to any authentication implementation. Therefore, you would implement a passport strategy of your choosing (jwt, oauth, http basic) within admin-on-rest's authClient.js
https://marmelab.com/admin-on-rest/Authentication.html
What is the best way to implement user login system for website in hapi.js framework ?
I have searched a lot through the internet but I still don't know which module I should use to implement such authentication. I prefer using passport but the documentation for passport and hapi is so brief. Can anyone suggest me any module? Or a detailed documentation for passport and hapi.js ?
Thank you
If you're looking to do basic authentication, take a look at hapi-auth-basic. Alternately, you may wish to look at hapi-auth-cookie.
If you're looking for third-party login via oAuth there is Bell.
For more on authentication with Hapi take a look at the tutorial on hapijs.com.