反应错误中的 MsalAuthProvider : 'children' 在类型 'IntrinsicAttributes & IAzureADProps' 上不存在



我使用:react aad msal从react应用程序对Azure进行身份验证。

我已根据文档配置了我的authprovider:https://www.npmjs.com/package/react-aad-msal#msal-配置

一切都很好,似乎至少有一点效果。但当我尝试将其包裹在这样的组件上时:

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
<AzureAD provider={authProvider}>
<App/>
</AzureAD>
</React.StrictMode>

我得到的错误:

ype '{ children: Element; provider: MsalAuthProvider; }' is not assignable to type 'IntrinsicAttributes & IAzureADProps'.
Property 'children' does not exist on type 'IntrinsicAttributes & IAzureADProps'

以前有人遇到过这个问题吗?这让我抓狂。。。

你试过了吗https://www.npmjs.com/package/@azure/msal会做出反应吗?这是Microsoft为React支持的官方身份验证库。

相关内容

  • 没有找到相关文章

最新更新