MsalGuard redirect to login instead of automatically authenticating? #7257
Labels
feature-unconfirmed
msal-angular
Related to @azure/msal-angular package
msal-browser
Related to msal-browser package
public-client
Issues regarding PublicClientApplications
question
Customer is asking for a clarification, use case or information.
Core Library
MSAL.js (@azure/msal-browser)
Wrapper Library
MSAL Angular (@azure/msal-angular)
Public or Confidential Client?
Public
Description
I was checking this issue #3047 and the OP wanted to login automatically upon entering a protected path.
I want the opposite, I would like
MsalGuard
to redirect to my login page instead of trying to automatically authenticate (thus triggering amsal:loginStart
event) upon arrival to a protected route. I only want the app to try to authenticate when the user clicks on my "SSO Login" button.My Setup
PathLocationStrategy
,MsalRedirectComponent
(bootstrapped inapp.module
) in its own/auth
route, with its tag present inindex.html
. Login page with a button that callsloginRedirect()
. UsinglogoutRedirect({ account })
to logout withpostLogoutRedirectUri
to my login page,MsalGuard
protecting all routes except/auth
,/login
and error pages,RoleGuard
protecting certain screens.Source
External (Customer)
The text was updated successfully, but these errors were encountered: