简体   繁体   English

Azure AAD B2C 样品 API 问题

[英]Azure AAD B2C Sample API Issue

I have an issue with the Azure sample AAD B2C API (all the steps are followed) - code taken from: AAD B2C我对 Azure 示例 AAD B2C API 有疑问(遵循所有步骤)- 代码取自: AAD B2C
Note: Also tested with another sample AAD code: AAD and it worked without any issues.注意:还使用另一个示例 AAD 代码进行了测试: AAD并且它可以正常工作。
The issue (issue for AAD B2C) is on the API and when I try to connect to the localhost of the api, the following error pops up:问题(AAD B2C 的问题)在 API 上,当我尝试连接到 api 的本地主机时,会弹出以下错误: 在此处输入图像描述 I don't understand what I am missing?我不明白我错过了什么?
Thank you谢谢

The issue is from the appsettings, but I was misguided from the steps that I was following from the AAD B2C link.问题出在 appsettings 上,但我被 AAD B2C 链接中的步骤误导了。 In the page says:在页面上说:
"Find the key Instance and replace the existing value with your Azure AD B2C tenant name." “找到键 Instance 并将现有值替换为您的 Azure AD B2C 租户名称。”
"Find the key Domain and replace the existing value with your Azure AD B2C tenant name." “找到关键域并将现有值替换为您的 Azure AD B2C 租户名称。”
So in my case I was just adding the names of the tenant.因此,就我而言,我只是添加了租户的姓名。

In the appsettings the correct way is:在 appsettings 中正确的方法是:

"AzureAdB2C": {
    "Instance": "https://TENANT-NAME.b2clogin.com/",
    "ClientId": "ID from the App registration of the API",
    "Domain": "TENANT-NAME.onmicrosoft.com",
    "SignUpSignInPolicyId": "B2C_1_user_flow",
    "EditProfilePolicyId": "B2C_1_edit_user_flow"
  }

Thank you Tiny Wang for the guidance.谢谢小王的指导。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM