You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After successful login through SWA, MSAL doesn't detect any authenticated accounts, causing a redirect loop.
Setup
Angular application using the latest MSAL version
Deployed on Azure Static Web Apps (SWA) with Entra ID authentication
Route guard checks MSAL for user authentication
If not authenticated, redirects to SWA auth route
Expected behavior
User authenticates with SWA and is able to be used by MSAL when Angular application auth runs.
if (this.msal.instance.getAccounts().length > 0)
return 'AUTHENTICATED'
return redirectTo(SWAURL + '/.auth/login/aad')
Additional context
The application should be able to run and authenticate locally using only Angular, without relying on Azure Static Web Apps or its CLI.
The text was updated successfully, but these errors were encountered:
Describe the bug
After successful login through SWA, MSAL doesn't detect any authenticated accounts, causing a redirect loop.
Setup
Angular application using the latest MSAL version
Deployed on Azure Static Web Apps (SWA) with Entra ID authentication
Route guard checks MSAL for user authentication
If not authenticated, redirects to SWA auth route
Expected behavior
User authenticates with SWA and is able to be used by MSAL when Angular application auth runs.
SWA auth config
MSAL config
Same Tenant and Client Id
Route guard(simplified) causing the loop
Additional context
The application should be able to run and authenticate locally using only Angular, without relying on Azure Static Web Apps or its CLI.
The text was updated successfully, but these errors were encountered: