首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从Azure MSAL升级到MSAL 2.0

从Azure MSAL升级到MSAL 2.0
EN

Stack Overflow用户
提问于 2022-06-20 11:02:26
回答 1查看 145关注 0票数 0

试图从@Azure/MSAL库升级到最新的v2 of MSAL.js 2.0,但得到了以下错误:

Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'

注意到,acquireTokenSilent()方法不再接受logon_hint作为参数,而是切换到ssoSilent()方法,而是传递带有logon_hint集的SsoSilentRequest。但还是会犯这个错误..。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-06-20 11:04:38

结果发现,错误信息是很明显的。需要更新验证下的重定向URI,以便在Azure AD中注册应用程序。有一个将URI从Web迁移到单页应用程序的方法.

看起来,要升级到MSAL库的v2.0版本,就需要对App注册进行更改。请参阅Azure门户中的下列警告:

This app has implicit grant settings enabled. If you are using any of these URIs in a SPA with MSAL.js 2.0, you should migrate URIs.

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72686105

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档