fix: remove unregistered 'roles' scope from OAuth2 requests

- Remove 'roles' from .env.development and .env.production
- Remove 'roles' from SeedData.cs
- 403 error was caused by requesting unregistered scope
- All registered scopes: openid, profile, email, api, offline_access
This commit is contained in:
Sam 2026-02-06 15:49:40 +08:00
parent 65ea3ecf79
commit 8bd64b8ea3
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ VITE_GLOB_API_URL=http://localhost:5231/api
VITE_AUTH_SERVICE_URL=http://localhost:5000
VITE_OAUTH_CLIENT_ID=fengling-console
VITE_OAUTH_REDIRECT_URI=http://localhost:5777/auth/callback
VITE_OAUTH_SCOPE=api offline_access openid profile email roles
VITE_OAUTH_SCOPE=api offline_access openid profile email
# 是否开启 Nitro Mock服务true 为开启false 为关闭
VITE_NITRO_MOCK=false

View File

@ -22,4 +22,4 @@ VITE_ARCHIVER=true
VITE_AUTH_SERVICE_URL=https://auth.yourdomain.com
VITE_OAUTH_CLIENT_ID=fengling-console
VITE_OAUTH_REDIRECT_URI=https://your-app.com/auth/callback
VITE_OAUTH_SCOPE=api offline_access openid profile email roles
VITE_OAUTH_SCOPE=api offline_access openid profile email