react-aad icon indicating copy to clipboard operation
react-aad copied to clipboard

Document The Samples Better

Open opticyclic opened this issue 5 years ago • 0 comments
trafficstars

Library versions

  • react-aad-msal: 2.3.2
  • msal: 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.

opticyclic avatar Sep 14 '20 17:09 opticyclic