I am using MSAL.js v2 with Angular 11
I have an application where I already signed in , I am using the same configuration like below
clientId: environment.clientId,
authority: b2cPolicies.authorities.signUpSignIn.authority,
knownAuthorities: [b2cPolicies.authorityDomain],
redirectUri: environment.redirectUri,
The requirement is to implement single signon when I loggedin to application1 and when trying to open application2, application 2 should get all the account details with asking to sign in again
This below code snippet I am using in application2 to check if user is already logged in in the browser or not
console.log( this.authService.instance.getActiveAccount()). // This is returning null
const SsoSilentRequest = {
loginHint: '******@gmail.com' // I have added my static mail id which i used to login in application1
}
Note : I even tried by providing domainHint and scopes also in above param
this.authService.instance.ssoSilent(SsoSilentRequest).then((res) => {
console.log(res)
}).catch(error => {
console.error("Silent Error: " + error);
});
But I am getting below error
BrowserAuthError: monitor_window_timeout: Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors.