Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure B2C - Behavior with Multiple Tabs after logout #6458

Closed
Ronald123ol opened this issue Sep 11, 2023 · 8 comments
Closed

Azure B2C - Behavior with Multiple Tabs after logout #6458

Ronald123ol opened this issue Sep 11, 2023 · 8 comments
Labels
b2c Related to Azure B2C library-specific issues 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.

Comments

@Ronald123ol
Copy link

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

3.0.4

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

3.0.0-alpha.0

Public or Confidential Client?

Public

Description

My problem is that when I log out of my page in Angular and it redirects me to the login (b2c custom login), if the user has multiple tabs open and is logged out and tries to log in, b2c presents a bad request through the console bcs we know that b2c doesn't allow you interact with login in multiple tabs, but i was wondering how to manage that error? users may get confused if they have that problem. I need to pass any property on the login request?

MSAL Configuration

export const msalConfig: Configuration = {
  auth: {
    clientId: environment.azure_config.clientId,
    authority: environment.b2c_policies.authorities.signUpSignIn.authority,
    knownAuthorities: [environment.b2c_policies.authorityDomain],
    redirectUri: environment.azure_config.redirecturi,
    navigateToLoginRequestUrl: true,
  },
  cache: {
    cacheLocation: BrowserCacheLocation.LocalStorage,
    storeAuthStateInCookie: isIE,
  },
  system: {
    allowNativeBroker: false,
     loggerOptions: {
      loggerCallback(logLevel: LogLevel, message: string) {
        console.log(message);
      },
      logLevel: LogLevel.Verbose,
      piiLoggingEnabled: false
  },

};

Relevant Code Snippets

export const loginRequest = {

  scopes: ['openid'],
  state: "success",
  prompt: "login"
};

export function MSALGuardConfigFactory(): MsalGuardConfiguration {
  return {
    interactionType: InteractionType.Redirect,
    authRequest: loginRequest
  };
}


 logout() {
      const logoutRequest = {
        postLogoutRedirectUri: `${LocalEnvironmentPostLogoutUri}`,
      };

      this.authService.logoutRedirect(logoutRequest);


      this.logoutPageCommunicationService.sendLogoutSignal();
    }

  }

Identity Provider

Azure B2C Custom Policy

Source

External (Customer)

@Ronald123ol Ronald123ol added the question Customer is asking for a clarification, use case or information. label Sep 11, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Sep 11, 2023
@github-actions github-actions bot added b2c Related to Azure B2C library-specific issues msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Sep 11, 2023
@konstantin-msft konstantin-msft removed their assignment Sep 11, 2023
@microsoft-github-policy-service
Copy link
Contributor

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. no assignees please follow up.

2 similar comments
@microsoft-github-policy-service
Copy link
Contributor

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. no assignees please follow up.

@microsoft-github-policy-service
Copy link
Contributor

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. no assignees please follow up.

@microsoft-github-policy-service
Copy link
Contributor

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. no assignees please follow up.

3 similar comments
@microsoft-github-policy-service
Copy link
Contributor

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. no assignees please follow up.

@microsoft-github-policy-service
Copy link
Contributor

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. no assignees please follow up.

@microsoft-github-policy-service
Copy link
Contributor

This issue requires attention from the MSAL.js team and has not seen activity in 5 days. no assignees please follow up.

@tnorling
Copy link
Collaborator

This is a question I would suggest you bring to B2C support as MSAL does not control this specific behavior/restriction or have any knowledge of it

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Attention 👋 Awaiting response from the MSAL.js team label Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b2c Related to Azure B2C library-specific issues 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.
Projects
None yet
Development

No branches or pull requests

3 participants