我遇到了一个问题,我不确定为什么会得到这个,基本上,我正在尝试使Azure AD B2C正常工作,这在我的本地计算机上有效,如果我在Azure免费的虚拟主机上尝试它它可以工作,但是在我正在使用的Web主机上,我不知道这是否是因为Web主机如何工作,还是其他原因?
为安全起见,已部分删除使用的域,但核心错误仍然存在:
我还使用.Net Core作为后端,当我在浏览器中键入url时,它起作用了,而在托管提供程序上就没有作用了。
// Startup.cs
with open(filename.csv, 'r') as f:
for line in f:
words=line.split(',')
bac1_count=words[2].count(bac1)
bac2_count=words[2].count(bac1)
bac3_count=words[2].count(bac1)
words.append(bac1_count, bac2_count, bac3_count)
print(','.join(words))
// apsettings.json
services.AddAuthentication(AzureADB2CDefaults.AuthenticationScheme)
.AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options));
答案 0 :(得分:0)
您需要在 appsettings.json 中添加“Authority”。所以现在它看起来像
"AzureAdB2C": {
"Authority": "https://login.microsoftonline.com/tfp/{tenantName}.onmicrosoft.com/B2C_1_{signup_policy}/v2.0/",
"Instance": "https://abc.b2clogin.com/",
"ClientId": "asdas",
"Domain": "abc.onmicrosoft.com",
"SignedOutCallbackPath": "/signout/B2C_1_susi",
"SignUpSignInPolicyId": "b2c_1_susi",
"ResetPasswordPolicyId": "b2c_1_reset",
"CallbackPath": "/b2csignin",
"EditProfilePolicyId": "b2c_1_edit_profile"
},
这应该可以解决您的问题