Skip to content

Commit

Permalink
whoopsies
Browse files Browse the repository at this point in the history
  • Loading branch information
PranjalChaitanya committed Apr 28, 2024
1 parent 3cd3b6c commit 8fb35a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion admin-api-frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const App = ({ instance }) => {
console.error("Ah fuck!")
return null;
}
instance.addEventCallback((event) => { if (event.eventType === EventType.SSO_SILENT_FAILURE && event.error?.errorCode === 'monitor_window_timeout') { instance.acquireTokenRedirect({ ...loginRequest, }); } });

console.log(acct);
return (
<MsalProvider instance={instance}>
Expand Down
2 changes: 2 additions & 0 deletions admin-api-frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import 'bootstrap/dist/css/bootstrap.min.css';
*/
const msalInstance = new PublicClientApplication(msalConfig);

msalInstance.addEventCallback((event) => { if (event.eventType === EventType.SSO_SILENT_FAILURE && event.error?.errorCode === 'monitor_window_timeout') { instance.acquireTokenRedirect({ ...loginRequest, }); } });

// Default to using the first account if no account is active on page load
if (!msalInstance.getActiveAccount() && msalInstance.getAllAccounts().length > 0) {
// Account selection logic is app dependent. Adjust as needed for different use cases.
Expand Down

0 comments on commit 8fb35a9

Please sign in to comment.