|
|
@@ -4,7 +4,7 @@ let oidcManager = null |
|
|
|
|
|
|
|
export const initServe = () => { |
|
|
|
if (oidcManager) return oidcManager |
|
|
|
const { VITE_AUTHORITY, VITE_CLIENT_ID, VITE_CLIENT_SECRET, VITE_REDIRECT_URI } = import.meta.env |
|
|
|
const { VITE_AUTHORITY, VITE_CLIENT_ID, VITE_CLIENT_SECRET } = import.meta.env |
|
|
|
oidcManager = new UserManager({ |
|
|
|
/* 认证服务器 */ |
|
|
|
authority: VITE_AUTHORITY, |
|
|
@@ -12,8 +12,8 @@ export const initServe = () => { |
|
|
|
client_id: VITE_CLIENT_ID, |
|
|
|
client_secret: VITE_CLIENT_SECRET, |
|
|
|
/* 回调客户端页面 */ |
|
|
|
redirect_uri: VITE_REDIRECT_URI, |
|
|
|
post_logout_redirect_uri: VITE_REDIRECT_URI, |
|
|
|
redirect_uri: `${window.location.origin}/login`, |
|
|
|
post_logout_redirect_uri: `${window.location.origin}/login`, |
|
|
|
response_type: 'code', |
|
|
|
/* 授权范围 */ |
|
|
|
scope: 'openid profile', |