feat: add OAuth2 configuration to web-ele
This commit is contained in:
parent
bad60b5108
commit
02415839ab
22
apps/web-ele/src/config/oauth.ts
Normal file
22
apps/web-ele/src/config/oauth.ts
Normal file
@ -0,0 +1,22 @@
|
||||
export const oauthConfig = {
|
||||
clientId: import.meta.env.VITE_OAUTH_CLIENT_ID || 'fengling-console',
|
||||
redirectUri: import.meta.env.VITE_OAUTH_REDIRECT_URI || `${window.location.origin}/auth/callback`,
|
||||
authUrl: import.meta.env.VITE_AUTH_SERVICE_URL || 'http://localhost:5000',
|
||||
scope: import.meta.env.VITE_OAUTH_SCOPE || 'api offline_access openid profile email roles',
|
||||
|
||||
endpoints: {
|
||||
authorize: '/connect/authorize',
|
||||
token: '/connect/token',
|
||||
logout: '/connect/logout',
|
||||
revocation: '/connect/revocation',
|
||||
},
|
||||
|
||||
storageKeys: {
|
||||
accessToken: 'oauth_access_token',
|
||||
refreshToken: 'oauth_refresh_token',
|
||||
expiresAt: 'oauth_expires_at',
|
||||
codeVerifier: 'oauth_code_verifier',
|
||||
state: 'oauth_state',
|
||||
returnTo: 'oauth_return_to',
|
||||
},
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user