Douban is a Chinese SNS website allowing registered users to record information and create content related to film, books, music, and recent events and activities in Chinese cities.
Since Douban didn’t provide email, the user have to fill the email address manually.
https://github.com/fantasticfears/douban-login
Authenticate with discourse with Douban.
通过豆瓣登陆 Discourse。
Register Client Key & Secert / 申请豆瓣接入
- 登录豆瓣开发者中心,注册填写相关信息。
- 点击
我的应用
,再点击创建新应用
。 - 填写相关信息。
网站域名
可填写根域名或者具体域名。如图所示。(验证所需要的标签可在 Discourse 设置中插入,验证后即可删除;访问 Discourse 管理面板 - 内容 - 页面顶部)
回调地址:
- https 填写:
http://meta.discoursecn.org:443/auth/douban/callback
- http 填写:
http://meta.discoursecn.org/auth/douban/callback
- 在申请到的后台找到刚申请到的引用,概览中即可以获得
key
和secret
,将其填入Discourse 设置中。
Installation / 安装
Docker 安装
在 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/fantasticfears/douban-login.git
Manual / 手动安装
Run rake plugin:install repo=https://github.com/fantasticfears/douban-login
in your discourse directory
In development mode, run rake assets:clean
In production, recompile your assets: rake assets:precompile
在您 Discourse 目录中运行 rake plugin:install repo=https://github.com/fantasticfears/douban-login
在开发者模式下,运行 rake assets:clean
在生产模式下,重编译 assets rake assets:precompile
Usage / 使用
Go to Site Settings’s login category, fill in the client id and client secret.
进入站点设置的登录分类,填写 client id 和 client serect。
Issue / 问题
Visit topic on Discourse Meta or GitHub Issues.