I am using "@azure/msal-browser": "^2.1.0", with my React SPA that is hosted on Azure app service. In my App.js I am using msalInstance.acquireTokenPopup(tokenRequest) to get a auth token, and this triggers a pop in the browser to prompt user to login if they are not. I need to check if browser is allowing popup if not, ask user to enable it first and reload the app. Would be a great help if anyone has a good solution.
Asked
Active
Viewed 539 times
1 Answers
0
If the token request is triggered by a user-generated event handler - onclick() et al - it shouldn't make a difference that the browser is running a pop-up blocker.
Popups exist from really ancient times...
You could also use .acquireTokenRedirect() instead of .acquireTokenPopup()
Andrew Bastian
- 1
- 1
-
Using acquireTokenRedirect still triggering pop window for some strange reason, but thanks for the link. :) – loftywaif002 Nov 07 '20 at 08:06