我遵循了本教程“ https://github.com/azure-ad-b2c/samples/tree/master/policies/embedded-password-reset”。一切正常。但是,当我尝试添加自定义UI页面来设置整个更改密码向导的样式时,在验证电子邮件后,“继续”按钮被禁用。另外,我找不到在更改密码工作流程中删除“更改电子邮件”按钮的方法。
我所做的唯一更改是将自定义页面添加到样式更改密码页面。
<ContentDefinition Id="api.localaccountpasswordreset">
<LoadUri>https://xxx.blob.core.windows.net/yyy/selfasserted.html</LoadUri>
<Metadata>
<Item Key="DisplayName">Local account change password page</Item>
</Metadata>
</ContentDefinition>
自定义html页面
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function() {
// Remove the provided password reset link
$("#forgotPassword").remove();
// Move the new password reset button to the right position
$("#PasswordResetUsingEmailAddressExchange").detach().appendTo("label[for='password']");
// Set the style of the password reset button to look like a link
$("#PasswordResetUsingEmailAddressExchange").attr("style",
"background: none!important; color:#2872DD; border:none; padding:0!important; font-size: .75em; height: auto; width: auto; margin-left: 5px");
});
</script>
</head>
<body>
<div id="api"></div>
</body>
</html>
答案 0 :(得分:0)
The Azure AD B2C guidelines for use of JavaScript表示您必须包括其他版本的jQuery;否则,这会导致页面UI中出现问题。