我正在尝试使用 AAD B2C 页面 UI 自定义以及自定义策略,如下所述:https ://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-ui-customization -自定义。我可以让我的内容出现,但标准 B2C 内容似乎没有按预期合并。
我的 Extensions.xml 文件中有这个 userjourney:
<UserJourney Id="SignInB2CLocal">
<OrchestrationSteps>
<OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
<ClaimsProviderSelections>
<ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
</ClaimsProviderSelections>
<ClaimsExchanges>
<ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="2" Type="ClaimsExchange">
<Preconditions>
<Precondition Type="ClaimsExist" ExecuteActionsIf="true">
<Value>objectId</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
<ClaimsExchanges>
<ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="3" Type="ClaimsExchange">
<ClaimsExchanges>
<ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />
</ClaimsExchanges>
</OrchestrationStep>
<OrchestrationStep Order="4" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
</OrchestrationSteps>
</UserJourney>
我有这个 ContentDefinition,也在我的 Extensions.xml 文件中:
<BuildingBlocks>
<ContentDefinitions>
<ContentDefinition Id="api.signuporsignin">
<LoadUri>https://kdesteasidmcustom.blob.core.windows.net/LocalSignUI.html</LoadUri>
<RecoveryUri>~/common/default_page_error.html</RecoveryUri>
<DataUri>urn:com:microsoft:aad:b2c:elements:idpselection:1.0.0</DataUri>
<Metadata>
<Item Key="DisplayName">Idp selection page</Item>
<Item Key="language.intro">Sign in</Item>
</Metadata>
</ContentDefinition>
</ContentDefinitions>
</BuildingBlocks>
上面引用的我的 UI 自定义文件 (LocalSignUI.html) 非常简单:
<!DOCTYPE html>
<html>
<body>
<h1>It worked!</h1>
<div id="api"></div>
</body>
</html>
www.test-cors.org 似乎认为我的内容文件正确设置了 CORS。当我尝试运行 userjourney(使用 Azure AADB2C 门户的路径)时,我得到一个页面,显示“它成功了!” (来自我的 html 内容文件),“登录”(不确定它的来源,但可能来自 ContentDefinition “language.intro” 键),仅此而已 - 页面的其余部分是空白的。如果我检查页面源,有很多 javascript 和一些标签来涵盖 no-cookie 和 no-javascript 场景,但是没有表单或输入标签。我查看了应用程序洞察中的日志信息,并看到了对我的内容文件的引用,但没有明显的错误。
有任何想法吗?
谢谢!
马丁