angular-standalone-sample does not work properly #7757
Labels
documentation
Related to documentation.
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
Documentation Location
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-angular-samples/angular-standalone-sample
Description
First off, if you're still using AD B2C, the sample code just doesn't work at all, you'll get an error:
ERROR ClientAuthError: endpoints_resolution_error: Endpoints cannot be resolved
You need to add
knownAuthorities: ['https://XXXX.b2clogin.com']
to the auth configuration.After you do so, the authentication flow works fine, but when you refresh the page the toolbar (
app.component
) doesn't keep the logged in state and displays the "login" button again, instead of "logout". For some reason theinProgress$
observable isn't triggered.Curiously enough the same code works in the
home.component
, I can't figure out why.Also can't figure out why the
home.component
has a whole bunch of direct interactions with the msal library just to get the auth state when it should really just consume anauth.service
The text was updated successfully, but these errors were encountered: