Reddit 提供方在 Users & Permissions 中的设置
页面摘要: 通过创建 Reddit 应用并在 Strapi 的提供方设置中输入 Client ID 和 Secret,为 Users & Permissions 配置 Reddit 提供方。
本页介绍如何为 Users & Permissions 功能 设置 Reddit 提供方。
WARNING
Reddit 配置
NOTE
Reddit 接受 localhost URL。
无需使用 ngrok。
- 访问 Reddit 已授权应用的首选项页面,地址为 https://www.reddit.com/prefs/apps
- 点击靠近底部的 create another app...(创建另一个应用...)按钮
- 类型选择 web app(Web 应用)
- 填写 name(名称)和 redirect uri(重定向 URI)输入框
- 点击 create app(创建应用)按钮
- 注意,Client ID 位于应用类型(web app)下方
Strapi 配置
- 访问 User & Permissions 提供方设置页面,地址为 http://localhost:1337/admin/settings/users-permissions/providers
- 点击 Reddit 提供方
- 填写以下信息(替换为你自己的客户端 ID 和密钥):
- Enable:
ON - Client ID:hmxSBOit0SCjSQ
- Client Secret:gwR9hCjK_PMYVYNGeDLS4WLB8g7xqg
- 指向你前端应用的重定向 URL:
http://localhost:3000/connect/reddit/redirect
- Enable:
你的配置已完成。启动后端和 react 登录示例应用,访问 http://localhost:3000 并尝试连接到你所配置的提供方。