TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How do you handle Authorization?

5 pointsby firatcanover 3 years ago
Hey everyone,<p>tl;dr - What do you use for Authorization in your projects, and what&#x27;s the benefit of using that system?<p>I&#x27;ll be honest, I&#x27;m working on building an Authorization system right now.<p>We were contracted to build an ERP for a client. And last of our 4-5 project needed a complex authorization system.<p>So this time we wanted to build Authorization system as a product which you can customize the permissions, roles and policies. (And use again and again - We already have a Demo)<p>I have found several ways to handle authorization such as Zanzibar, OPA, Ory Keto etc... And I&#x27;m wondering what do you use yourself in your side projects or work?<p>What&#x27;s the benefits did you find your own way etc.?

1 comment

nimvlaj30over 3 years ago
There are two ways (that I&#x27;m aware of) of doing auth; JWT tokens or storing sessions in database. Sessions in database is probably the most secure way. But I&#x27;m working with a React SPA, so I&#x27;m using JWT tokens.<p>I&#x27;ve only had brief familiarity with using Amazon Cognito for work. Pain points are that I&#x27;m not sure how secure storing JWT tokens in the browser&#x27;s localstorage is. I briefly looked into HTTP-only cookies, but it seems more difficult to set, and also not really worth it?<p>It seems that CSRF and XSS vulnerabilities remain an unsolved problem. If you want to improve on something in that space, I&#x27;d say security is <i>the</i> major area to do it in. Seriously, I&#x27;d put up with more technical pain than AWS Amplify&#x27;s Javascript library is giving me just to guarantee that the application is secure.
评论 #29440026 未加载