为用户和权限设置 Auth0 提供程序
🌐 Auth0 provider setup for Users & Permissions
Page summary:Auth0 提供程序设置为用户与权限功能启用 OAuth 2.0 身份验证,需要在 Auth0 租户和 Strapi 管理设置中使用客户端 ID、客户端密钥和子域凭据进行配置。
🌐 Auth0 provider setup enables OAuth 2.0 authentication for the Users & Permissions feature, requiring configuration in both Auth0 tenant and Strapi admin settings using Client ID, Client Secret, and subdomain credentials.
本页解释了如何为用户与权限功能设置 Auth0 提供程序。
🌐 The present page explains how to setup the Auth0 provider for the Users & Permissions feature.
Auth0 配置
🌐 Auth0 configuration
Note
Auth0 接受 localhost URL。
不需要使用 ngrok。
- 访问你的 Auth0 租户仪表板
- 在 API 部分,创建一个新的 API
- 在应用中,创建一个
machine-to-machine应用并选择你刚刚创建的 API - 在此应用的设置中设置以下值:
- 允许的回调 URL:
http://localhost:1337/api/connect/auth0/callback - 允许的退出登录 URL:
http://localhost:3000 - 允许的网页来源:
http://localhost:3000
- 允许的回调 URL:
- 在设置底部,显示“高级设置”并进入“授权类型”。确保勾选/启用这些授权:
- 隐含的
- 授权码
- 刷新令牌
- 客户端凭据