Live data from Hacker News

Ask HN: What do you use to build auth?

news.ycombinator.com

41–50 of 141 posts

Re: Ask HN: What do you use to build auth?

#41

Auth isnt hard, built lots of auth systems. Crypto is the thing I won't touch with a ten foot pole.

-1 Auth (in the form of broken access control) is literally _the_ most common security problem according to the OWASP Top 10 [1]. And I think people thinking it isn't hard does significantly contribute to this questionable honor.

[1]: https://owasp.org/Top10/A01_2021-Broken_Access_Control/

Re: Ask HN: What do you use to build auth?

#42
Simple hashed passwords and a few emails are not hard to make myself so I do that. Also makes it much easier to tie in roles which are much different for each project. It really isn't that hard to build a simple one yourself and gives you much more control and one less dependency on an outside service.

Re: Ask HN: What do you use to build auth?

#43
Auth0. I've tried a bunch of third parties and I found Auth0 to have good documentation, a great free plan, good support, and a user experience that is quite good. Some of the Rules/Actions terminology is a bit confusing, but overall the management UI and APIs are quite good.

In addition, they have easy means of customizing the User object, querying external data sources, etc. Highly recommend.

Re: Ask HN: What do you use to build auth?

#44
From a user perspective, how does everyone here feel about magic links vs email and password?

Personally, I am torn.

As a developer, magic links are awesome. You put a new project online, and everyone on planet earth already is a user. Well everyone who has an email.

But from a user perspective, it is more cumbersome. For one because the switch between email and website. And because the typical magic link implementation invalidates the link after one use. So if I don't keep the cookie, I have to do the "enter email, receive email, click link" dance again. Entering my email and a password is faster.

Re: Ask HN: What do you use to build auth?

#46
post #19

I too have seen the articles proclaiming that devs should stop implementing auth themselves and instead use some Auth as a service product. After all Authentication is hard to get right, right? Actually the basics are really easy. Using a short-term JWT and bcrypt to salt passwords is like maybe 10 lines of code. The thing is, most of the truly hard Auth problems I've had to solve in my career took a highly custom ap…

You didn't mention MFA. You didn't mention SSO. You didn't mention self-serve reset flows. Your approach doesn't work well with mobile apps. These are not rare, exotic things in 2022.

Re: Ask HN: What do you use to build auth?

#47
post #44

From a user perspective, how does everyone here feel about magic links vs email and password? Personally, I am torn. As a developer, magic links are awesome. You put a new project online, and everyone on planet earth already is a user. Well everyone who has an email. But from a user perspective, it is more cumbersome. For one because the switch between email and website. And because the typical magic link implementat…

I'd rather use SSO over magic links as a user, for what it's worth.

Email is unreliable, there's typos, people not knowing their email address, etc. Meanwhile with SSO, two clicks and it logs you into the site with the email you're logged in with.

Re: Ask HN: What do you use to build auth?

#48
post #32

We've rolled our own (zero frills) so far, but are looking at PropelAuth ( https://www.propelauth.com/ ) to add MFA and other bells and whistles and we like what we see. (Full disclosure, they've become friends of ours through YC)

Thanks! I’m the founder of PropelAuth - our focus is providing user authentication for b2b businesses. We did a launch HN[0] a while back if you want to read more about us.

[0] https://news.ycombinator.com/item?id=30700770

Re: Ask HN: What do you use to build auth?

#49
Disclaimer: I am the co-founder of Cerbos[0]

Auth is actually a combination of two things: authentication and authorization.

Whatever you do, please do not build either by yourself. It always starts simple and it is guaranteed to get more complex than anyone is willing to maintain (unless you have a dedicated security engineering team)

There are many providers for each. Authentication is about the user's identity and where they belong in the organization (directory), and authorization is about what they are allowed to do based on their identity, role, and attributes.

Cerbos[0] is an open-source authorization solution which integrates with many identity providers to enable your product to implement fine grained permissions. We have integrated with the most popular authentication providers and they can be found on our ecosystem page[1]

Cerbos also has an out-of-the-box integration with Prisma[2] which enables you to fetch only those records that the user has permissions to from your data store - one of the most tricky parts of implementing authorization.

Whatever solution you end up going with, please save yourself some time and do not re-invent the wheel!

[0]: https://cerbos.dev [1]: https://cerbos.dev/ecosystem [2]: https://cerbos.dev/blog/fully-featured-authorization-for-you...

Re: Ask HN: What do you use to build auth?

#50
post #49

Disclaimer: I am the co-founder of Cerbos[0] Auth is actually a combination of two things: authentication and authorization. Whatever you do, please do not build either by yourself. It always starts simple and it is guaranteed to get more complex than anyone is willing to maintain (unless you have a dedicated security engineering team) There are many providers for each. Authentication is about the user's identity and…

This is very cool. I'm familiar with CASL for authz which also has a Prisma integration; is the main benefit of Cerbos over that the built-in logging?
Post reply on HN