Issue: MSAL Login Loop in Azure Static Web Apps with Password Protection on Safari #1543
PraiseThampiCC
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
In Azure Static Web Apps, when using Microsoft Authentication Library (MSAL) for login and enabling the password protection feature, users face a login loop issue in the Safari browser. This problem does not occur in other browsers like Chrome and Edge.
Steps to Reproduce
Create a React Application
Develop a basic React application and integrate MSAL login functionality. Ensure that the app requires users to authenticate via MSAL.
Host the Application on Azure Static Web Apps
Deploy the React application using Azure Static Web Apps. After deployment, enable the password protection feature in Azure Static Web Apps settings.
Test the Application in Safari Browser
Open the hosted application in Safari:
Observations
Safari Browser:
This login loop issue only occurs in Safari, where the user is continually prompted to enter the static web app password after initiating MSAL login. The user is stuck in a loop and cannot complete the login process.
Chrome and Edge:
The same configuration works as expected in other browsers like Chrome and Edge, where users are only prompted for the static web app password once, followed by a successful MSAL login.
Potential Causes and Considerations
The issue appears to be isolated to Safari, suggesting a potential incompatibility between how Safari handles cookies, sessions, or redirects in combination with Azure Static Web App's password protection and MSAL login flow.
Additional Context:
we use password protection feature of static web apps in the testing environments of our websites
Beta Was this translation helpful? Give feedback.
All reactions