TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do you handle Authorization?

5 点作者 firatcan超过 3 年前
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

nimvlaj30超过 3 年前
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 未加载