# Wp\_discourse 无法记住登录状态

**URL:** https://meta.discourse.org/t/wp-discourse-unable-to-remember-login-status/267663
**Category:** WordPress
**Created:** [2023年六月8日 13:11 UTC](https://meta.discourse.org/t/wp-discourse-unable-to-remember-login-status/267663 "2023-06-08T13:11:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![shihuang214](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shihuang214/32/242738_2.png) [@shihuang214](https://meta.discourse.org/u/shihuang214)
#### Post date: [2023年六月8日 13:11 UTC](https://meta.discourse.org/t/wp-discourse-unable-to-remember-login-status/267663/1 "2023-06-08T13:11:51Z")

</div>

虽然在我记忆中“记住登录状态”应该是浏览器功能，但我不能确定是由于所用主题、WP\_Discourse 还是 Discourse 的配置问题。

当前遇到的问题是 Discourse 已使用 WP\_Discourse 并且与 Wordpress 连接良好。我将 Discourse 用作主要的账户库，Wordpress 不提供注册。

Discourse 中的登录状态会一直保持，除非主动登出，但在浏览器中再次访问 Wordpress 时，每次都需要重新登录，这意味着每次都需要点击“使用 Discourse 登录”链接。

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2023年六月9日 07:33 UTC](https://meta.discourse.org/t/wp-discourse-unable-to-remember-login-status/267663/2 "2023-06-09T07:33:28Z")

</div>

嘿 @shihuang214，

这是我对您问题的理解，但如果我错了，请纠正我：

1. 您使用 [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true)，以 Discourse 作为提供商，WordPress 作为客户端，并使用 [WP Discourse](https://github.com/discourse/wp-discourse) 插件。
2. 您希望 WordPress 身份验证在不同的浏览器会话中保持持久。

您遇到的具体问题与 [WP Discourse](https://github.com/discourse/wp-discourse) 插件和 [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) 基本无关。一旦您通过 [WP Discourse](https://github.com/discourse/wp-discourse) 中的 [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) 登录，登录状态（即您是否保持登录）由 WordPress 本身处理。请查看类似以下的解决方案：

> **[Persistent Login](https://wordpress.org/plugins/wp-persistent-login/)**
>
> Persistent Login keeps users logged into your website, limits the number of active logins allowed at one time and alerts users of new devices logging …

---

<div class="post-metadata">

### Author: ![shihuang214](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shihuang214/32/242738_2.png) [@shihuang214](https://meta.discourse.org/u/shihuang214)
#### Post date: [2023年六月9日 07:38 UTC](https://meta.discourse.org/t/wp-discourse-unable-to-remember-login-status/267663/3 "2023-06-09T07:38:29Z")

</div>

非常感谢！！！！  
也感谢这个很棒的插件 - wp\_discourse！！！

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2023年七月9日 07:38 UTC](https://meta.discourse.org/t/wp-discourse-unable-to-remember-login-status/267663/4 "2023-07-09T07:38:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
