Twitter 提供程序的用户和权限设置
¥Twitter provider setup for Users & Permissions
本页面说明如何为 用户和权限功能 设置 Twitter 提供商。
¥The present page explains how to setup the Twitter provider for the Users & Permissions feature.
推特配置
¥Twitter configuration
Twitter 不接受 localhost
网址。
使用 ngrok
为后端应用提供服务。
¥Twitter doesn't accept localhost
urls.
Use ngrok
to serve the backend app.
ngrok http 1337
不要忘记使用生成的 ngrok URL 更新后端配置文件 config/server.js
中的服务器 URL 和前端应用中的服务器 URL(如果你使用 React 登录示例应用,则为环境变量 REACT_APP_BACKEND_URL
)。
¥Don't forget to update the server url in the backend 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.
-
访问应用列表页面 [https://developer.twitter.com/en/apps](https://developer.twitter.com/en/apps)
¥Visit the Apps list page at https://developer.twitter.com/en/apps
-
单击创建应用按钮
¥Click on Create an app button
-
填写信息(替换为你自己的 ngrok url):
¥Fill the information (replace with your own ngrok url):
-
应用名称:Strapi Twitter 授权
¥App name: Strapi Twitter auth
-
应用说明:这是 Strapi 身份验证的演示应用
¥Application description: This is a demo app for Strapi auth
-
告诉我们这个应用将如何使用:* 在这里写一条足够长的消息 -
¥Tell us how this app will be used: - here write a message enough long -
-
-
在此过程结束时,你应该会看到你的应用 ID 和密码,保存它们以供以后使用
¥At the end of the process you should see your Application ID and secret, save them for later
-
转到你的应用设置并单击编辑身份验证设置
¥Go to you app setting and click on edit Authentication settings
-
启用第 3 方身份验证并请求用户的电子邮件地址
¥Enable 3rd party authentication AND Request email address from users
-
填写信息(替换为你自己的 ngrok url):
¥Fill the information (replace with your own ngrok url):
-
回调网址:
https://65e60559.ngrok.io/api/connect/twitter/callback
¥Callback URLs:
https://65e60559.ngrok.io/api/connect/twitter/callback
-
网址:
https://65e60559.ngrok.io
¥Website URL:
https://65e60559.ngrok.io
-
隐私政策:
https://d73e70e88872.ngrok.io
¥Privacy policy:
https://d73e70e88872.ngrok.io
-
服务条款:
https://d73e70e88872.ngrok.io
¥Terms of service:
https://d73e70e88872.ngrok.io
-
表带配置
¥Strapi configuration