diff --git a/Project/src/Utils/Utils.js b/Project/src/Utils/Utils.js index da1041f..50ce748 100644 --- a/Project/src/Utils/Utils.js +++ b/Project/src/Utils/Utils.js @@ -94,9 +94,10 @@ export const utils = { return response.data; } const authConfig = await fetchAuthConfig(); + const redirectUri = `${window.location.origin}/blank`; const oAuthObj = new PublicClientApplication(authConfig.configuration); - const popupLoginResponse = await oAuthObj.loginPopup({scopes: authConfig.scopes.popUpLogin}); + const popupLoginResponse = await oAuthObj.loginPopup({scopes: authConfig.scopes.popUpLogin, redirectUri}); const response = await axios({ url: 'teamsPopupLogin', method: 'POST', @@ -149,9 +150,10 @@ export const utils = { return response.data; } const entraCredentialConfig = await fetchEntraConfig(); + const redirectUri = `${window.location.origin}/blank`; const tokenCredential = new InteractiveBrowserCredential({ - redirectUri: window.location.href, // e.g., 'http://localhost:3000' + redirectUri, // e.g., 'http://localhost:3000' ...entraCredentialConfig }); const credential = new AzureCommunicationTokenCredential({ diff --git a/Project/webpack.config.js b/Project/webpack.config.js index feca3f2..ee543b5 100644 --- a/Project/webpack.config.js +++ b/Project/webpack.config.js @@ -254,6 +254,9 @@ module.exports = { res.sendStatus(400); } }); + devServer.app.get('/blank', async (req, res) => { + res.status(200).send(''); + }); devServer.app.post('/createRoom', async (req, res) => { try { let participants = [];