(Angular) PWA
See original GitHub issueCore Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.16.1
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
2.0.2
Description
Hi.
I’m currently building an (Angular) PWA app which uses Azure B2C as IDP. I have issues where the user is offline, and MSAL calls B2C endpoints which results in the user being redirected to B2C. Having no net, this breaks the PWA experience, and I’m not sure what happens (if the token expires or if there’s some other mechanism leading to the redirect. It’s kinda hard and time consuming to debug).
I was wondering if anyone here has experience using B2C with a PWA and would share config / insights on how to handle caching (if at all), overrides or interceptors (if required)?
I saw that you @jakehockey10 had some similar ideas and questions in #3283. Did you manage to implement this?
MSAL Configuration
MsalModule.forRoot(new PublicClientApplication({
auth: {
clientId: environment.auth.clientId,
authority: environment.auth.authority,
redirectUri: environment.auth.redirectUri,
postLogoutRedirectUri: environment.auth.postLogoutRedirectUri,
knownAuthorities: environment.auth.knownAuthorities
},
cache: {
cacheLocation: BrowserCacheLocation.LocalStorage
},
system: {
loggerOptions: {
loggerCallback: (logLevel: LogLevel, a: string, b: boolean) => {},
piiLoggingEnabled: false
}
}
}), {
interactionType: InteractionType.Redirect,
authRequest: {
scopes: [...environment.auth.scopes]
}
}, {
interactionType: InteractionType.Redirect,
protectedResourceMap: new Map([
[environment.auth.scopesUri,
environment.auth.scopes
]
])
})
Relevant Code Snippets
No response
Identity Provider
Azure B2C Basic Policy
Source
External (Customer)
Issue Analytics
- State:
- Created a year ago
- Comments:21 (18 by maintainers)
Top GitHub Comments
@andreaslarssen I am currently looking into this , thanks for your patience!
@andreaslarssen This is being tracked internally, dont have an ETA at this point. #3758 covers similar ask.