msal login implemented

This commit is contained in:
sumedh
2025-04-16 14:20:31 +05:30
parent 7e86fc7822
commit 5cc54c9332
6 changed files with 381 additions and 58 deletions

View File

@@ -0,0 +1,26 @@
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);