An API that connects multiple Microsoft services, enabling data access and automation across platforms
Angular , Ionic, "@azure/msal-angular" and "@azure/msal-browser" don't work together like in web without ionic
I am using the "@azure/msal-angular" and "@azure/msal-browser" libraries for B2C login with Angular 15. I have already used them in a web application, and everything works fine. However, I am now building a mobile application with Ionic 7 and using the same code. I run the application with "ionic serve" to test it on the web. When I refresh the application, the method in the app component, this.msalBroadcastService.msalSubject$ (for EventType.LOGIN_SUCCESS), never gets called. The method is only triggered when the endpoint with a new scope is hit, resulting in EventType.SSO_SILENT_SUCCESS. The network tab does not show the endpoint being triggered to check if I am logged in when I refresh the application, as it does in the web version. My question is whether this is the expected behavior, or if something additional needs to be configured for Ionic. Also, do these libraries work with Ionic? If not, what alternative do you suggest? I prefer a free library that works with B2C, as I want to use the same login for both web and mobile applications.