File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ interface AuthConfigResponse {
88 enabled : boolean ;
99 client_id : string ;
1010 authority : string ;
11- api_scope : string ;
11+ api_scopes : string ;
12+ audience : string ;
1213}
1314
1415export const useAuthStore = defineStore ( "auth" , ( ) => {
@@ -46,19 +47,23 @@ export const useAuthStore = defineStore("auth", () => {
4647 }
4748
4849 function transformToAuthConfig ( config : AuthConfigResponse ) : AuthConfig {
50+ const apiScope = JSON . parse ( config . api_scopes ) . join ( " " ) ;
4951 return {
5052 authority : config . authority ,
5153 client_id : config . client_id ,
5254 redirect_uri : window . location . origin ,
5355 post_logout_redirect_uri : window . location . origin ,
5456 response_type : "code" ,
55- scope : `${ config . api_scope } openid profile email offline_access` ,
57+ scope : `${ apiScope } openid profile email offline_access` ,
5658 automaticSilentRenew : true ,
5759 loadUserInfo : false ,
5860 includeIdTokenInSilentRenew : true ,
5961 silent_redirect_uri : window . location . origin + "/silent-renew.html" ,
6062 filterProtocolClaims : true ,
6163 userStore : new WebStorageStateStore ( { store : window . sessionStorage } ) ,
64+ extraQueryParams : {
65+ audience : config . audience ,
66+ } ,
6267 } ;
6368 }
6469
Original file line number Diff line number Diff line change @@ -25,8 +25,7 @@ const port = 5173;
2525const defaultUrls = [
2626 "http://10.211.55.3:*" , // The default Parallels url to access Windows VM
2727 "http://localhost:*" ,
28- "https://login.microsoftonline.com" , // Entra ID authentication
29- "https://graph.microsoft.com" , // Microsoft Graph API
28+ "https://*" ,
3029] ;
3130
3231// https://vitejs.dev/config/
You can’t perform that action at this time.
0 commit comments