![](/img/trans.png)
[英]ASP.NET Core 3.1 and Azure AD B2C with external Identity Providers auth - invalid_request
[英]Test cloud authentication in web APIs with Azure Active Directory B2C in ASP.NET Core - return error “invalid_request”
我遵循此教程: 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/zh-cn/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"
}
}
}
}
申请邮递员
应用程序WebApi
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.