我使用: react-aad-msal从一个react对Azure进行认证。
我已经按照文档配置了我的authprovider:https://www.npmjs.com/package/react-aad-msal#msal-configuration
一切都很好,而且似乎至少起了一点作用。但是,当我试图将它封装在如下组件上时:
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'以前有人遇到过这个问题吗?这让我发疯了..。
发布于 2022-09-20 22:14:50
你试过https://www.npmjs.com/package/@azure/msal-react了吗?这是Microsoft支持的官方身份验证库React。
https://stackoverflow.com/questions/73746743
复制相似问题