Skip to main content

Twitch 提供程序的用户和权限设置

¥Twitch provider setup for Users & Permissions

本页面说明如何为 用户和权限功能 设置 Twitch 提供商。

¥The present page explains how to setup the Twitch provider for the Users & Permissions feature.

Prerequisites

你已阅读 用户和权限提供商文档

¥You have read the Users & Permissions providers documentation.

抽搐配置

¥Twitch configuration

注意

Twitch 接受 localhost 网址。
不需要使用 ngrok

¥Twitch accepts the localhost urls.
The use of ngrok is not needed.

  1. 访问开发者控制台上的应用列表页面 [https://dev.twitch.tv/console/apps](https://dev.twitch.tv/console/apps) 

    ¥Visit the Apps list page on the developer console at https://dev.twitch.tv/console/apps 

  2. 单击注册你的应用按钮

    ¥Click on Register Your Application button

  3. 填写信息:

    ¥Fill the information:

    • 名称:Strapi 授权

      ¥Name: Strapi auth

    • OAuth 重定向 URL:http://localhost:1337/api/connect/twitch/callback

      ¥OAuth Redirect URLs: http://localhost:1337/api/connect/twitch/callback

    • 类别:选择一个类别

      ¥Category: Choose a category

  4. 单击新应用的管理按钮

    ¥Click on Manage button of your new app

  5. 使用“新密钥”按钮生成新的客户端密钥

    ¥Generate a new Client Secret with the New Secret button

  6. 你应该会看到你的应用 ID 和密码,保存起来供以后使用

    ¥You should see your Application ID and secret, save them for later

表带配置

¥Strapi configuration

  1. 访问用户和权限提供商设置页面位于 [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 

  2. 单击 Twitch 提供商

    ¥Click on the Twitch provider

  3. 填写信息(替换为你自己的客户端 ID 和密码):

    ¥Fill the information (replace with your own client ID and secret):

    • 使能够:ON

      ¥Enable: ON

    • 客户编号:amuy279g8wt68qlht3u4gek4oykh5j

      ¥Client ID: amuy279g8wt68qlht3u4gek4oykh5j

    • 客户秘密:dapssh10uo97gg2l25qufr8wen3yr6

      ¥Client Secret: dapssh10uo97gg2l25qufr8wen3yr6

    • 前端应用的重定向 URL:http://localhost:3000/connect/twitch/redirect

      ¥The redirect URL to your front-end app: http://localhost:3000/connect/twitch/redirect

你的配置已完成。启动后端和 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.