为了账号安全,请及时绑定邮箱和手机立即绑定

使用 ASP.NET Core 中的 Azure Active Directory B2C

使用 ASP.NET Core 中的 Azure Active Directory B2C

C#
临摹微笑 2021-07-13 13:00:23
我遵循本教程:https : //docs.microsoft.com/fr-fr/aspnet/core/security/authentication/azure-ad-b2c-webapi?view=aspnetcore-2.1当我测试与 Postman 的连接时,出现登录页面(我之前可以注册)但在验证表单时,Postman 返回此错误: invalid_request我无法通过 Postman 的控制台获得有关错误的更多详细信息。我在这里找到了更多信息:https : //docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#error-codes-for-authorization-endpoint-错误错误代码:invalid_request描述:协议错误,例如缺少必需的参数。客户端操作:修复并重新提交请求。这是一个开发错误,通常在初始测试期间被发现。但我找不到丢失或配置不当的设置。邮差验证网址:https : //login.microsoftonline.com/trukafaire.onmicrosoft.com/oauth2/v2.0/authorize? p =B2C_1_SiUpIn范围: https: //trukafaire.onmicrosoft.com/c9f1cb20-xxxx-xxxx-xxxx-xxxxxxxxxxxx/user_impersonation openid offline_access视觉工作室我的 webapi 在这个地址运行(使用 Visual Studio 创建的模板,没有更改):https://localhost:44362/(我测试时她正在运行)。我的 appsettings.json :{  "AzureAdB2C": {    "Instance": "https://login.microsoftonline.com/tfp/",    "ClientId": "c9f1cb20-xxxx-xxxx-xxxx-xxxxxxxxxxxx",    "Domain": "trukafaire.onmicrosoft.com",    "SignUpSignInPolicyId": "B2C_1_SiUpIn"  },  "Logging": {    "IncludeScopes": false,    "Debug": {      "LogLevel": {        "Default": "Warning"      }    },    "Console": {      "LogLevel": {        "Default": "Warning"      }    }  }}
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 219 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信