msal login implemented
This commit is contained in:
26
src/views/pages/auth/MsalConfig.js
Normal file
26
src/views/pages/auth/MsalConfig.js
Normal 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);
|
||||
Reference in New Issue
Block a user