gpt4 book ai didi

azure - AADSTS9002325 : Proof Key for Code Exchange is required for cross-origin authorization code redemption - Published on Azure

转载 作者:行者123 更新时间:2023-12-03 02:10:53 34 4
gpt4 key购买 nike

我喜欢在 Azure 上托管应用程序时运行 MSAL 身份验证。当我在 Azure 上将 Blazor WASM 应用程序发布为 WebApp 时,我会看到以下屏幕。

错误屏幕

1

如果我使用本地主机进行调试,一切都会像魅力一样工作,并且我已登录,我将重定向到我的应用程序,但如果我将我的应用程序发布到azure,它将无法工作。

我尝试将重定向网址添加为“Web”而不是“SPA”,但随后我会立即转发到我的应用程序中的/authentication/login-failed。

如果我在 list 中使用“Spa”,我将被重定向到 Microsoft 登录。我填写数据并得到与上面所示相同的屏幕。

我使用 .Net 6 和以下 NuGet 包:

NuGet 包

2

请问谁能帮我解决这个问题吗?

问候萨沙

最佳答案

确实在某些情况下,您必须在Web平台而非SPA(单页应用程序)下添加重定向URL。

另请尝试在 azure 的 list 中将replyUrlsWithType更改为web门户网站。

"replyUrlsWithType": [ 
{
"url": "https://local.com ",
"type":"web"
}
],

enter image description here

  • 如果 web 类型导致错误,请尝试在类似的方法中更改为 SPA方式。

另请检查Redirect URI (reply URL) restrictions - Microsoft Entra | Microsoft Docs .

Note:But please try to delete the url and clear the cache before updating the new one with new url type based on the application.

关于azure - AADSTS9002325 : Proof Key for Code Exchange is required for cross-origin authorization code redemption - Published on Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73412080/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com