question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

400 bad request error while Sign In

See original GitHub issue

Core Library

MSAL.js v2 (@azure/msal-browser)

Core Library Version

2.22.0

Wrapper Library

MSAL React (@azure/msal-react)

Wrapper Library Version

1.3.0

Public or Confidential Client?

Public

Description

Can’t be able to do azure b2c login with two tabs.

Reproduce the error: Step: 1 Open the login page in two tabs. Step 2: Now go to the first tab and do login and left the tab as it is. Step 3: Now go to second tab and try to do login Step 4: See the network tab of second you will get error of 400 bad request

Error Message

image

Msal Logs

No response

MSAL Configuration

const msalConfig: Configuration = {

    auth: {
        clientId: xyz....,
        authority: b2cPolicies.authorities.signUpSignIn.authority,
        knownAuthorities: [b2cPolicies.authorityDomain],
        redirectUri: process.env.REACT_APP_AUTH_REDIRECT_URI,
        postLogoutRedirectUri: process.env.REACT_APP_AUTH_REDIRECT_URI,
        navigateToLoginRequestUrl: true
    },
    cache: {
        cacheLocation: BrowserCacheLocation.SessionStorage,
        storeAuthStateInCookie: isIE
    }
}

Relevant Code Snippets

----

Reproduction Steps

Step: 1 Open the login page in two tabs. Step 2: Now go to the first tab and do login and left the tab as it is. Step 3: Now go to second tab and try to do login Step 4: See the network tab of second you will get error of 400 bad request

Expected Behavior

It should not return 400 error instead it should do login as usual.

Identity Provider

Azure B2C Basic Policy

Browsers Affected (Select all that apply)

Chrome, Firefox, Edge, Safari, Internet Explorer, None (Server), Other

Regression

No response

Source

Internal (Microsoft)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bmahallcommented, Oct 28, 2022

@anjalikalsariya Can you please share verbose logs on email mentioned on my profile, if they are not showing up for some reason, please update.

0reactions
msftbot[bot]commented, Nov 3, 2022

@anjalikalsariya This issue has been automatically marked as stale because it is marked as requiring author feedback but has not had any activity for 5 days. If your issue has been resolved please let us know by closing the issue. If your issue has not been resolved please leave a comment to keep this open. It will be closed automatically in 7 days if it remains stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The 400 Bad Request error indicates that the server cannot or process the request due to a client error. Read about the common...
Read more >
How to Fix a 400 Bad Request Error: 8 Easy Methods
The 400 bad request error is an HTTP status code that describes an error caused by an invalid request. Thus, the server can't...
Read more >
What is a 400 Bad Request Error (and How Can I Fix It)?
A 400 Bad Request Error occurs when a request sent to the website server is incorrect or corrupt, and the server receiving the...
Read more >
400 Bad Request Error: What It Is and How to Fix It
The 400 Bad Request Error is an HTTP response status code indicating that the server was unable to process the request sent by...
Read more >
HTTP Error 400 Bad Request: What It Is and How to Fix It
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found