我正在按照 Auth0 应用程序设置说明进行 Cypress 测试,详细信息 here .
我被困在这一步了
Next, click your Tenant icon (upper right avatar menu) to go to your Tenant Settings. On the General tab go to the API Authorization Settings.
- Set "Default Audience" to the Audience URL for the Application you are testing (e.g. https://your-api-id.auth0.com/api/v2/)
我应该为 your-api-id
添加什么内容(我对 Auth0 术语不太熟悉)。
最佳答案
这是 Cypress 测试将用来调用 Auth0 的 URL。
我发现应用程序设置下的域是一个很好的默认值
- 导航至“应用程序”菜单
- 选择您要测试的应用
- 进入设置子菜单
- 从此处复制域设置
示例:
Domain: <my-domain>.us.auth0.com
Tenant Default Audience: https://<my-domain>.us.auth0.com/api/v2/
哪里<my-domain>
是应用程序设置期间分配的域。
关于Cypress Auth0 租户设置 - 什么是 "default audience",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73676093/