首页 > 解决方案 > 传递给 Twitch API 的范围被 Auth0 忽略

问题描述

我一直在尝试使用 Auth0 读取 twitch 用户订阅数据 - 无济于事。

我在他们的文档中找到了一些信息,解释了如何将海关范围添加到身份验证请求中。

我正在从“@auth0/auth0-spa-js”导入 createAuth0Client 函数并调用以下函数

 this.auth0Client = await createAuth0Client({
        domain: options.domain,
        client_id: options.clientId,
        audience: options.audience,
        redirect_uri: redirectUri,
        scope: 'email profile user:read:subscriptions' // change the scopes that are applied to every authz request. **Note**: `openid` is always specified regardless of this setting
      });

当我被重定向到 twitch 进行身份验证时,它只是请求访问我的电子邮件。从不请求读取订阅,因此未获得授权。

任何指导或示例将不胜感激。

标签: vue.jsoauthauth0twitchtwitch-api

解决方案


推荐阅读