azure-ad-b2c - Azure AD B2C 自助服务密码重置显示错误的标题
问题描述
启用此新的自助服务密码重置时,它会在登录页面上显示错误的标题。
它显示了这些:
Sign in with your social account
OR
Sign in with your sign in name
但是我没有使用任何社交帐户,仅使用本地帐户,使用您的社交帐户登录是空的。
我还尝试了这个示例,将 facebook 删除为社交帐户,只有本地帐户,但是它保留了空的Sign in with your social account。
https://github.com/azure-ad-b2c/samples/tree/master/policies/embedded-password-reset
是否有人设法仅为本地帐户启用自助密码重置并具有正确的标题使用您的登录名登录?
解决方案
有两种方法可以解决这个问题:
- 使用.
Localization
_Identity Experience Framework
这将允许您修改UxElements
您的内容定义。可以在https://docs.microsoft.com/en-us/azure/active-directory-b2c/localization找到更多信息。 - 完全自定义用户界面 - https://docs.microsoft.com/en-us/azure/active-directory-b2c/customize-ui-with-html?pivots=b2c-custom-policy
我花了一分钟时间在我的一个策略上对此进行测试,但这是我添加到我的登录/注册页面以验证本地化的内容。
<BuildingBlocks>
<Localization Enabled="true">
<SupportedLanguages DefaultLanguage="en" MergeBehavior="ReplaceAll">
<SupportedLanguage>en</SupportedLanguage>
</SupportedLanguages>
<LocalizedResources Id="api.selfasserted.en">
<LocalizedStrings>
<LocalizedString ElementType="UxElement" StringId="local_intro_generic">Brad</LocalizedString>
</LocalizedStrings>
</LocalizedResources>
</Localization>
</BuildingBlocks>
然后更新了我的内容定义:
<ContentDefinition Id="api.selfasserted">
<LoadUri>~/tenant/templates/AzureBlue/selfAsserted.cshtml</LoadUri>
<RecoveryUri>~/common/default_page_error.html</RecoveryUri>
<DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.2</DataUri>
<Metadata>
<Item Key="DisplayName">Collect information from user page</Item>
</Metadata>
<LocalizedResourcesReferences>
<LocalizedResourcesReference Language="en" LocalizedResourcesReferenceId="api.selfasserted.en"/>
</LocalizedResourcesReferences>
</ContentDefinition>
推荐阅读
- c# - 当 AutoSizeRowsMode 为 AllCells 时,datagridview 无法设置行高
- html - 如果文本像“...更多”一样溢出,如何添加自定义文本
- apache-flink - 对 JobManager 和 JobMaster 感到困惑
- arrays - 如何在 MPLABx 中以图形方式可视化数组的内容
- c# - 存储到数据库中的长文本字符串的有效比较
- php - 根据用户的注册日期,通过日期分组获取固定的记录数
- python - 无法抓取谷歌结果
- android - 删除不支持 Google Play 的消息
- pandas - 如何在熊猫数据框中为缺失的年份和季度创建行
- python - 在迭代卡方测试的行中获取 KeyError