Msal.js iframe在twitter上出现问题,并从多个google帐户中进行选择

Msal.js iframe在twitter上出现问题,并从多个google帐户中进行选择,iframe,msal,Iframe,Msal,我正在学习javascript。我尝试在相同的github链接中运行给定的 通过facebook或microsoft帐户登录,该应用程序运行平稳。但当我尝试使用twitter登录时,它会抛出以下错误: Refused to display 'https://api.twitter.com/oauth/authenticate?oauth_token=....' in a frame because an ancestor violates the following Content Securi

我正在学习javascript。我尝试在相同的github链接中运行给定的

通过facebook或microsoft帐户登录,该应用程序运行平稳。但当我尝试使用twitter登录时,它会抛出以下错误:

Refused to display 'https://api.twitter.com/oauth/authenticate?oauth_token=....' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' https://tweetdeck.twitter.com https://tdapi-staging.smf1.twitter.com https://tdapi-staging.atla.twitter.com https://tweetdeck.localhost.twitter.com". 
Refused to display 'https://accounts.google.com/o/oauth2/auth?.....' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
此外,当我在浏览器中有一个单一google帐户登录时,或者当我在google登录页面上输入google凭据时,该示例也能很好地工作。但当我登录了多个google帐户并为应用程序选择其中一个帐户时,它会抛出以下错误:

Refused to display 'https://api.twitter.com/oauth/authenticate?oauth_token=....' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' https://tweetdeck.twitter.com https://tdapi-staging.smf1.twitter.com https://tdapi-staging.atla.twitter.com https://tweetdeck.localhost.twitter.com". 
Refused to display 'https://accounts.google.com/o/oauth2/auth?.....' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
在这两种情况下(twitter和多个google帐户),都会发生登录,生成id令牌,但无法使用
acquireTokenSilent()
获取访问令牌,并抛出上述错误。然后,由于
acquireTokenpopup()
,登录弹出窗口再次显示,当我再次输入相同的凭据时,我获得了访问令牌

我尝试过使用
loginRedirect()
&
acquireTokenRedirect()
而不是popup,但我看到了相同的行为

到目前为止,我的理解是:

在错误情况下,iframe试图将google/twitter链接添加到应用程序主页的iframe src中(这显然是不允许的)

在成功获取access_令牌的情况下,我看到iframe src有一个microsoft登录链接(…)

有人能帮我理解为什么会这样吗?如果有人有办法解决这个问题,请帮帮我


我没有改变代码中的任何内容,我只是想了解msal.js是如何工作的,这样我就可以在另一个项目中实现它

你有没有找到解决这个问题的办法?差不多两年后,这仍然是一个问题。。。我今天也面临同样的问题