Patreon 提供商的用户和权限设置
¥Patreon provider setup for Users & Permissions
本页面说明如何为 用户和权限功能 设置 Patreon 提供商。
¥The present page explains how to setup the Patreon provider for the Users & Permissions feature.
Patreon 配置
¥Patreon configuration
Patreon 不接受 localhost
网址。
使用 ngrok
为后端应用提供服务。
¥Patreon does not accept localhost
urls.
Use ngrok
to serve the backend app.
ngrok http 1337
不要忘记使用生成的 ngrok URL 更新 Strapi 配置文件 ./config/server.js
中的服务器 URL 和前端应用中的服务器 URL(如果你使用 React 登录示例应用 ,则为环境变量 REACT_APP_BACKEND_URL
)。
¥Don't forget to update the server url in the Strapi config file ./config/server.js
and the server URL in your frontend app (environment variable REACT_APP_BACKEND_URL
if you use react login example app ) with the generated ngrok URL.
-
你必须是 Patreon Creator 才能注册 Oauth 客户端。
¥You must be a Patreon Creator in order to register an Oauth client.
-
¥Go to the Patreon developer portal
-
单击 客户端和 API 密钥
¥Click on Clients & API Keys
-
点击 "创建客户端"
¥Click on "Create Client"
-
输入你的组织和网站的详细信息。
¥Enter the details of your organization and website.
-
"应用类别" 有一个下拉菜单,但没有解释不同类别的含义。"社区" 似乎工作正常。
¥There is a drop-down for "App Category" but no explanation of what the different categories mean. "Community" seems to work fine.
-
你可以选择 API 的版本 1 或版本 2 - 两者都没有积极开发。版本 2 可能是最好的选择。查看其 开发者文档 了解更多详细信息。
¥You can choose either version 1 or version 2 of the API - neither are actively developed. Version 2 is probably the best choice. See their developer docs for more detail.
-
在 "重定向 URI" 下输入
https://your-site.com/api/connect/patreon/callback
¥Under "Redirect URI's" enter
https://your-site.com/api/connect/patreon/callback
-
保存客户端详细信息,然后你将看到客户端 ID 和客户端密钥。
¥Save the client details and you will then see the Client ID and Client Secret.
表带配置
¥Strapi configuration
-
访问用户和权限提供商设置页面位于 [http://localhost:1337/admin/settings/users-permissions/providers](http://localhost:1337/admin/settings/users-permissions/providers)
¥Visit the User & Permissions provider settings page at http://localhost:1337/admin/settings/users-permissions/providers
-
单击 Patreon 提供商
¥Click on the Patreon provider
-
填写信息:
¥Fill the information:
-
使能够:
ON
¥Enable:
ON
-
客户编号:
<Your Patreon Client ID>
- 如上¥Client ID:
<Your Patreon Client ID>
- as above -
客户秘密:
<Your Patreon Client Secret>
- 如上¥Client Secret:
<Your Patreon Client Secret>
- as above
-
你的配置已完成。启动后端和 react login 示例应用 ,转到 http://localhost:3000
并尝试连接到你配置的提供商。
¥Your configuration is done.
Launch the backend and the react login example application , go to http://localhost:3000
and try to connect to the provider you configured.