簡體   English   中英

ReactJS 前端與 Azure AD B2C 錯誤 UnsupportedAuthorityValidation

[英]ReactJS frontend with Azure AD B2C error UnsupportedAuthorityValidation

我有這個問題,我使用 ReactJS 前端和 Azure AD B2C,但是當我運行反應時顯示此錯誤“未捕獲(承諾)UnsupportedAuthorityValidation”我仍然不明白為什么

import b2cauth from 'react-azure-adb2c';


b2cauth.initialize({
  instance: 'https://FunSuitDev.onmicrosoft.com/tfp/', 
  tenant: 'FunSuitDev.onmicrosoft.com',
  signInPolicy: 'B2C_1_ADB2C_API',
  applicationId: 'ae82c7fe-a82b-448d-905f-6a63827e92a4',
  cacheLocation: 'sessionStorage',
  scopes: ['https://FunSuitDev.onmicrosoft.com/teastAPI/user_impersonation'],
  redirectUri: 'http://localhost:3000',
  postLogoutRedirectUri: window.location.origin,
});


b2cauth.run(() => {
  ReactDOM.render(<App />, document.getElementById('root'));
  serviceWorker.unregister();
});

在此處輸入圖像描述

請檢查您的庫的版本,此問題將對您有所幫助。

  1. 使用{your-tenant-name}.b2clogin.com而不是login.microsoftonline.com

  2. 如果您使用的是 MSAL.NET v2 或更早版本,請將ValidateAuthority屬性設置為false ,請參見此處

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM