msal working

This commit is contained in:
andrea.terzani
2025-04-16 19:31:21 +02:00
parent 5cc54c9332
commit 0e69938d97
6 changed files with 130 additions and 130 deletions

View File

@@ -1,26 +1,19 @@
import { PublicClientApplication } from '@azure/msal-browser';
import { reactive } from 'vue';
export const msalConfig = {
auth: {
clientId: 'd3fee0e3-49e0-4910-b0b4-805bfbd5488a',
authority: 'https://login.microsoftonline.com/9dc4721e-4d54-4c40-a681-1dd740292901',
redirectUri: 'http://localhost:5173/temp',
postLogoutUri: 'http://localhost:5173'
},
cache: {
cacheLocation: 'sessionStorage',
storeAuthStateInCookie: false
}
};
export const graphScopes = {
scopes: ['user.read', 'openid', 'profile']
};
export const state = reactive({
isAuthenticated: false,
user: null
});
export const msalInstance = new PublicClientApplication(msalConfig);
export const msalInstance = new PublicClientApplication({
auth: {
clientId: 'd3fee0e3-49e0-4910-b0b4-805bfbd5488a',
authority: "https://login.microsoftonline.com/9dc4721e-4d54-4c40-a681-1dd740292901",
redirectUri: "http://localhost:5173/auth/callback", // or your deployed URL
navigateToLoginRequestUrl: false,
},
cache: {
cacheLocation: "localStorage",
storeAuthStateInCookie: false,
}
})