如何实现多站点身份验证
我们拥有针对每个客户及其自己的域名进行品牌化的 SaaS 产品。我们正处于构建 API 的设计阶段,该 API 允许第三方为我们的客户创建小部件或完全不同的网站。第一个也是最困难的挑战之一是正确进行身份验证。
我并不完全熟悉 Stack Exchange 站点如何处理它,但乍一看似乎是类似的情况。每个站点都有自己的帐户和身份验证,但它们以某种方式链接在一起。当我登录 stackoverflow.com 然后访问 serverfault.com 时,它会自动让我登录。有谁知道他们是如何实现这一点的具体信息吗?
我们正在考虑以下几件事:
- 我们是否将每个帐户设置为“Stack Exchange”级别帐户,然后授权每个租户和每个应用程序?
- 我们是否让每个租户都有自己的 oauth 提供商,然后让用户授权每个应用程序?
- 我们如何像堆栈交换那样处理自动登录?
再说一遍,我们仍处于该过程的早期阶段,希望能够立即实现这一目标。任何建议和最佳实践将不胜感激。
We have SaaS product that is branded for each of our clients along with their own domain. We're in the design phase of building an api that would allow third-parties to create widgets or completely different websites for our clients. One of the first and hardest challenges is getting authentication right.
I'm not fully versed in how the Stack Exchange sites handle it but at first glance it seems like a similar scenario. Each site has their own accounts and authentication yet somehow they're linked together. When I log in to stackoverflow.com and then visit serverfault.com it automatically logs me in. Does anyone have any specifics on how they've implemented this?
A couple of things we're considering:
- Do we make each account a "Stack Exchange" level account and then authorize each tenant and each application?
- Do we let each tenant be there own oauth provider and then just have the user authorize each application?
- How could we handle auto-login like stack exchange does?
Again, we're still early in the process and want to get it right out of the gates. Any suggestions and best practices would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然你的问题很老了,但仍然没有答案。
以下是有关 StackExchange 多站点身份验证如何工作的信息(主要是技术方面的):
这里有一篇博客文章宣布了这一点:
祝你找到答案。如果您已经解决了问题,请与我们分享您的方法。
Though your question is quite old, it is still without an answer.
Here's information on how StackExchange multi-site authentication works (technical mostly):
And here'is a blog post announcing it:
Wish you find your answers. If you have already resolved your issue, please share your approach with us.