# 检查其他网站上用户是否已登录 Discourse

**URL:** <https://meta.discourse.org/t/checking-whether-a-user-is-logged-in-on-discourse-from-another-website/291185>\
**Category:** SSO\
**Created:** [2024 年1 月 10 日 15:21 UTC](https://meta.discourse.org/t/checking-whether-a-user-is-logged-in-on-discourse-from-another-website/291185 "2024-01-10T15:21:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![alehandrof](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alehandrof/32/119526_2.png) [@alehandrof](https://meta.discourse.org/u/alehandrof)\
发布日期： [2024 年1 月 10 日 15:21 UTC](https://meta.discourse.org/t/checking-whether-a-user-is-logged-in-on-discourse-from-another-website/291185/1 "2024-01-10T15:21:30Z")

</div>

大家好，

我想根据用户是否在我们私有的 Discourse 上拥有会员账户来限制对我们网站上某些页面的访问。我想我可以通过在这些页面上检查用户当时是否在 Discourse 上登录来实现这一点。

我认为合适的工具是：[GitHub - discourse/discourse-auth-proxy: An http proxy that uses the DiscourseConnect protocol to authenticate users](https://github.com/discourse/discourse-auth-proxy)

是否有关于使用它的分步文档？

我可以在与我们的 Discourse 站点相同的 DigitalOcean 实例上安装它，还是需要将其托管在其他地方？

---

_[View the full topic](https://meta.discourse.org/t/checking-whether-a-user-is-logged-in-on-discourse-from-another-website/291185)._
