[英]Blazor Webassembly asp.net hosted with Microsoft Azure AD authentication
I found a lot number of examples how o do this.我发现了很多如何做到这一点的例子。 https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory?view=aspnetcore-6.0 And it works fine when I run it locally in debug. https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory?view=aspnetcore-6.0当我在本地调试时它工作正常.
Everything is fine, until I want to publish the application up to an Azure APP Service.一切都很好,直到我想将应用程序发布到 Azure APP 服务。
To my surprise, the application does not work from the published site...令我惊讶的是,该应用程序无法在已发布的站点上运行...
I get the response:我得到回应:
Sign in登入
Sorry, but we're having trouble signing you in.抱歉,我们无法让您登录。AADSTS700054: response_type 'id_token' is not enabled for the application. AADSTS700054:没有为应用程序启用 response_type 'id_token'。
I can not find an example that go all the way to a published APP service...我找不到 go 一直到发布的 APP 服务的示例...
So what is wrong in my thinking here?那么我的想法有什么问题呢?
You need to register the app in Azure AD.您需要在 Azure AD 中注册应用程序。
Your error message is: "'id_token' is not enabled for the application"您的错误消息是:“没有为应用程序启用'id_token'”
To fix this under Advanced Settings, Implicit grant check the box "ID tokens".要在高级设置下解决此问题,请在隐式授权中选中“ID 令牌”框。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.