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

B2C login timeout after App Service deployment slot swap #6466

Closed
leskodan opened this issue Sep 12, 2023 · 1 comment
Closed

B2C login timeout after App Service deployment slot swap #6466

leskodan opened this issue Sep 12, 2023 · 1 comment
Assignees
Labels
b2c Related to Azure B2C library-specific issues bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-browser Related to msal-browser package msal-react Related to @azure/msal-react public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@leskodan
Copy link

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

2.30.0

Wrapper Library

MSAL React (@azure/msal-react)

Wrapper Library Version

1.5.0

Public or Confidential Client?

Public

Description

We are using msal-browser along with msal-react to implement auth in our next.js application with Azure AD B2C. Our next.js application is hosted on Azure App Service (runtime node 18). We deploy code changes via a github action to a staging slot and then swap the staging slot with our production slot to release the changes.

We have a single App Registrant in our B2C tenant that is shared by both deployment slots. The B2C configs are provided to our application via configuration values and fetched as server-side props.

Intermittently, about an hour after performing a swap (for changes unrelated to auth), the connection between our app and B2C will seemingly break as the login request will timeout and result in a B2C error. We do not observe any errors in our application code and the issue recovers on its own after 15-30mins.

Error Message

image (11)

The error in the console states that the requested service has either moved, had a name change, or been deleted even though no changes to the B2C configuration values or app registrant have been made.

Msal Logs

No logs available.

MSAL Configuration

const msalConfig: Configuration = {
        auth: {
            clientId: serverRuntimeConfig.AUTH_CLIENT_ID,
            authority: serverRuntimeConfig.AUTH_AUTHORITY,
            knownAuthorities: [serverRuntimeConfig.AUTH_KNOWN_AUTHORITY],
            redirectUri: '/',
            postLogoutRedirectUri: '/',
            navigateToLoginRequestUrl: true,
        },
    };

Relevant Code Snippets

Doesn't seem to be isolated to a specific section of code.

Reproduction Steps

This occurs intermittently, but the repro steps include:

  1. Deploy code change to staging slot (changes unrelated to auth configuration)
  2. Swap staging slot with production slot (no auth configuration changes, i.e. auth configuration identical in both slots)
  3. Attempt to reauthenticate with app-- encounter B2C timeout error
  4. Repeat step 3 until you are able to successfully authenticate with B2C

Expected Behavior

There should be zero downtime for the B2C connection when performing an App Service deployment slot swap.

Identity Provider

Azure B2C Basic Policy

Browsers Affected (Select all that apply)

Chrome

Regression

No response

Source

External (Customer)

@leskodan leskodan added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels Sep 12, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Sep 12, 2023
@github-actions github-actions bot added b2c Related to Azure B2C library-specific issues msal-browser Related to msal-browser package msal-react Related to @azure/msal-react public-client Issues regarding PublicClientApplications labels Sep 12, 2023
@hectormmg
Copy link
Member

@leskodan this sounds like a B2C service issue, MSAL has no influence on the service side. Please open a support ticket with the B2C team instead. Check this link out for more information on raising a B2C service ticket.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Attention 👋 Awaiting response from the MSAL.js team label Sep 14, 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 bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-browser Related to msal-browser package msal-react Related to @azure/msal-react 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

2 participants