我已经配置了一个Azure B2C应用程序[本机],并且正在迁移我的代码以使用 b2clogin.com 以及MSAL 3.0。
我的标识代码在设备上启动了 Azure B2C 进程,但随后它只是 404。 在此处输入图像描述 msauth.com。[MYAPPID]://auth 在 Info.plist 中指定,并作为重定向 URI。
什么可能导致 404?
我正在用下面构建 PCA
静态只读字符串租户 = $"{myappname}.onmicrosoft.com";
static readonly string AppName = "myappname";
static readonly string ClientID = "xxxx-xxxx-xxxx-xxx";
static readonly string SignUpAndInPolicy = "B2C_1_SignUp_SignIn";
static readonly string AuthorityBase = $"https://{AppName}.b2clogin.com/{Tenant}/v2.0/.well-known/openid-configuration";
static readonly string Authority = $"{AuthorityBase}?p={SignUpAndInPolicy}";
static readonly string RedirectUrl = $"msauth.********://auth";
msaClient = PublicClientApplicationBuilder.Create(ClientID)
.WithIosKeychainSecurityGroup("mybundleid")
.WithB2CAuthority(Authority)
.WithRedirectUri(RedirectUrl)
.Build();
像这样使用这些:
static string AuthorityBase = $"https://tenant.b2clogin.com/tfp/{tenant}.onmicrosoft.com/";
static string Authority = $"{AuthorityBase}{SignUpAndInPolicy}";