# Login Plugin: WeChat Login Plugin / WeChat Login Plugin

**URL:** https://meta.discourse.org/t/login-plugin-wechat-login-plugin/38876
**Category:** Plugin
**Tags:** auth-plugins
**Created:** [February 2, 2016, 5:31am UTC](https://meta.discourse.org/t/login-plugin-wechat-login-plugin/38876 "2016-02-02T05:31:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mooosu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mooosu/32/122001_2.png) [@mooosu](https://meta.discourse.org/u/mooosu)
#### Post date: [February 2, 2016, 5:31am UTC](https://meta.discourse.org/t/login-plugin-wechat-login-plugin/38876/1 "2016-02-02T05:31:19Z")

</div>

[https://github.com/mooosu/wechat\_qrconnect](https://github.com/mooosu/wechat_qrconnect)

* * *

Authenticate with discourse with wechat qrconnect.

通过 微信二维码 互联登陆 Discourse。

## 为高效运维论坛编写

论坛地址: [http://discuss.greatops.net/](http://discuss.greatops.net/)

## Register website application / 创建网站应用

1. 登录 [Wechat QRconnect](https://open.weixin.qq.com/)，注册填写相关信息。
2. 进入`管理中心`，点击`网站应用`，点击`创建网站应用`。
3. 根据向导完成注册。

> **Note:**  
> 目前微信只受理公司申请，也即需要提供有营业执照等

## Installation / 安装

#### 与Discourse同步安装

在 `app.yml` 的

```
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git

```

在 `- git clone https://github.com/discourse/docker_manager.git` 后添加：

```
- git clone https://github.com/mooosu/wechat_qrconnect

```

#### 或者对于已经部署过的系统可以使用下面命令

```bash
rake plugin:install repo=https://github.com/mooosu/wechat_qrconnect.git
rake assets:precompile

```

重启Rails。

## Usage / 使用

Go to Site Settings’s login category, fill in the client id and client secret.

进入站点设置的登录分类，填写 client id 和 client serect。

---

<div class="post-metadata">

### Author: ![loveapple](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loveapple/32/115828_2.png) [@loveapple](https://meta.discourse.org/u/loveapple)
#### Post date: [May 11, 2016, 8:21am UTC](https://meta.discourse.org/t/login-plugin-wechat-login-plugin/38876/2 "2016-05-11T08:21:01Z")

</div>

> 你好，我在版本1.6.0.beta4上上面安装之后，在设置的登录分类里面找不到相应的设置项目，怎么治？

不好意思，自己解决了

---

<div class="post-metadata">

### Author: ![11147](https://avatars.discourse-cdn.com/v4/letter/1/76d3ee/32.png) [@11147](https://meta.discourse.org/u/11147)
#### Post date: [October 2, 2016, 12:33am UTC](https://meta.discourse.org/t/login-plugin-wechat-login-plugin/38876/3 "2016-10-02T00:33:04Z")

</div>

Hi:

I see that your website enable QQ login function, clould you opensource that?

Thanks very much.

---

<div class="post-metadata">

### Author: ![aksoforever](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aksoforever/32/502615_2.png) [@aksoforever](https://meta.discourse.org/u/aksoforever)
#### Post date: [December 23, 2019, 6:52am UTC](https://meta.discourse.org/t/login-plugin-wechat-login-plugin/38876/4 "2019-12-23T06:52:21Z")

</div>

Dear mooosu  
when i login with the Qrconnect, it will to creat a new account, and it will login success  
My problem is i have already have registed account with email, how to Associated the weixin and discourse Accounts.  
can tell me how to change this plugin.

---

<div class="post-metadata">

### Author: ![Yucheng\_Jiang](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yucheng_jiang/32/182049_2.png) [@Yucheng\_Jiang](https://meta.discourse.org/u/Yucheng_Jiang)
#### Post date: [June 12, 2020, 3:43am UTC](https://meta.discourse.org/t/login-plugin-wechat-login-plugin/38876/5 "2020-06-12T03:43:23Z")

</div>

What are the client ID and client secret here? Are they related to a developer account?

---

<div class="post-metadata">

### Author: ![nwnuyhs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nwnuyhs/32/444904_2.png) [@nwnuyhs](https://meta.discourse.org/u/nwnuyhs)
#### Post date: [September 7, 2024, 7:08pm UTC](https://meta.discourse.org/t/login-plugin-wechat-login-plugin/38876/6 "2024-09-07T19:08:56Z")

</div>

Is there a QQ login plugin?
