TwitchをAuth0に接続する
1
Twitchの設定
- Twitch Developerアカウントページにアクセスしてサインアップします。
- Twitchではアプリケーションを登録する前に2FAの有効化が必須となっているため、2FAを有効にします。
- Twitch Developer Consoleで新しいアプリケーションを作成します。
- アプリケーションの登録フォームに必要事項を入力します。
-
OAuthリダイレクトURLを設定します。
- リダイレクトURL:
https://YOUR_AUTH0_DOMAIN/login/callback
You can find the Auth0 domain in the Auth0 Dashboard.You can find this under Applications > [Your Application] > Settings > Basic Information > Domain.If you are using the custom domains feature, your Auth0 domain is the custom domain. You can find this under Branding > Custom Domains. - リダイレクトURL:
- ドロップダウンからカテゴリーを選択します。
- ラジオボタンからクライアントの種類として[Confidential] (機密) を選択します。
- [Create]を選択します。
- [Applications]タブに戻り、[Developer Applications]の下でアプリを探して、[Manage]を選択します。
- 作成が完了すると、TwitchにClient IDが表示されます。また、[New Secret]を選択するとclient secretを作成できます。
- Client IDとclient secretをコピーします。
- [Save]を選択します。
2
Auth0の設定
このガイドでは、Auth0 で Twitch 接続をセットアップする手順を説明します。 このような接続を使用して、ユーザーに代わってアプリから第三者 API を呼び出す方法を一連の流れで示す例については、 ユーザーに代わって第三者 API を呼び出すクイックスタートをお読みください。
Token Vaultの設定例
Twitch接続用にToken Vaultを設定するには、アプリケーションで次のコードスニペットを使用します。Next steps
- To learn how to configure applications to access Token Vault, read Configure Token Vault.
- If your application uses Organizations, authenticate the user with the target organization before initiating the Connected Accounts flow. Connected accounts remain linked to the individual user profile.
- To learn how to get an access token to make a tool call, complete the Call third-party APIs on user’s behalf Quickstart.