diff --git a/src/views/pages/auth/Login.vue b/src/views/pages/auth/Login.vue
index 70dc9bc..aeefd0b 100644
--- a/src/views/pages/auth/Login.vue
+++ b/src/views/pages/auth/Login.vue
@@ -5,7 +5,7 @@ import axios from 'axios';
import Message from 'primevue/message';
import { onMounted, ref } from 'vue';
import { useRouter } from 'vue-router';
-import { msalInstance } from './MsalConfig';
+import { msalInstance, msalrequest } from './MsalConfig';
const auth = useAuth();
const { isDarkTheme } = useLayout();
const username = ref('');
@@ -29,7 +29,7 @@ onMounted(async () => {
const loginAD = async () => {
var token = await msalInstance.acquireTokenSilent({
- scopes: ["api://d3fee0e3-49e0-4910-b0b4-805bfbd5488a/access_as_user"],
+ scopes: msalrequest.scopes,
account: msaccount.value
})
console.log("Token " ,token)
@@ -57,9 +57,7 @@ const loginAD = async () => {
const loginMsal = async () => {
await msalInstance.initialize()
- msalInstance.loginRedirect({
- scopes: ["api://d3fee0e3-49e0-4910-b0b4-805bfbd5488a/access_as_user"]
- })
+ msalInstance.loginRedirect(msalrequest)
}
const login_old = async () => {
@@ -130,20 +128,14 @@ const login_old = async () => {
-
-
-
-
-
- {{ error }}
diff --git a/src/views/pages/auth/MsalConfig.js b/src/views/pages/auth/MsalConfig.js
index 6435c60..2f16c50 100644
--- a/src/views/pages/auth/MsalConfig.js
+++ b/src/views/pages/auth/MsalConfig.js
@@ -5,8 +5,8 @@ import { PublicClientApplication } from '@azure/msal-browser';
export const msalInstance = new PublicClientApplication({
auth: {
- clientId: 'd3fee0e3-49e0-4910-b0b4-805bfbd5488a',
- authority: "https://login.microsoftonline.com/9dc4721e-4d54-4c40-a681-1dd740292901",
+ clientId: '0c51b431-65ef-40fa-89ff-f66a1c583e0d',
+ authority: "https://login.microsoftonline.com/f3211d0e-125b-42c3-86db-322b19a65a22/",
redirectUri: "http://localhost:5173/auth/callback", // or your deployed URL
navigateToLoginRequestUrl: false,
},
@@ -15,5 +15,21 @@ export const msalInstance = new PublicClientApplication({
storeAuthStateInCookie: false,
}
})
-
-
\ No newline at end of file
+
+/*
+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,
+ }
+ })
+*/
+export const msalrequest = {
+ scopes: ["User.Read", "Mail.Read"],
+ }