react-aad
react-aad copied to clipboard
Document The Samples Better
Library versions
react-aad-msal: 2.3.2msal: 1.3.3
Describe the bug Following on from #207 the Javascript sample appears to be redirecting to the wrong URL
After testing the MS sample https://github.com/Azure-Samples/active-directory-b2c-javascript-msal-singlepageapp
I modified your sample to have the same config:
auth: {
authority: "https://mine.b2clogin.com/mine.onmicrosoft.com/B2C_1_signupsignin1",
clientId: "111xxx11-x111-111x-x11x-111xx11x1x11",
postLogoutRedirectUri: window.location.origin,
redirectUri: window.location.origin,
validateAuthority: true,
The sample tries to get https://login.microsoftonline.com/common//discovery/instance?api-version=1.1&authorization_endpoint=https://mine.b2clogin.com/mine.onmicrosoft.com/b2c_1_signupsignin1/oauth2/v2.0/authorize and logs an error 400.
Expected behavior
If I change validateAuthority: true, to validateAuthority: false, it then gets https://mine.b2clogin.com/mine.onmicrosoft.com/b2c_1_signupsignin1/v2.0/.well-known/openid-configuration and works.
Can you document what this means and add a README to the samples since this is clearly tripping up multiple people.