【发布时间】:2020-01-21 12:46:18
【问题描述】:
我目前正在实现this example,以便在用户注册期间使用休息 API。
基本思路是API抛出409 Conflict错误来中断注册。
// Can I return a special "StringId" or something here for localization?
return new ConflictObjectResult(new B2CResponseModel($"A verification email sent to you. Please open your mail box and click on the link. If you didn't receive the email, please click on the 'Send verification email' button.", HttpStatusCode.Conflict));
我想向用户显示一条本地化为他们当前语言的消息。我更愿意在自定义策略中进行本地化,但我也接受 API 中的解决方案(需要为此获取用户语言)。
有没有办法进行这种本地化?比如通过 API 返回 StringId 并在策略中使用它?
我也在考虑不从 API 返回错误,而是显示message in a new screen(如How to display error returned from custom REST API endpoint in a subsequent orchestration step?)。但是,我也无法找到这方面的本地化选项。
【问题讨论】:
标签: azure azure-ad-b2c identity-experience-framework