英文:
Link directly to change password form in B2C?
问题
我们有一个会员模型,其中禁用了公共注册,我们使用Graph API创建新用户。我正在努力寻找使用自定义策略的解决方案,以某种方式生成可以发送给新用户的链接。点击链接后,他们应该被引导到更改密码表单,完全绕过一次性代码步骤。一旦他们输入并确认了密码,他们的帐户就被激活,然后可以登录。
我已经查看了示例流程,但找不到与之匹配的内容。我在其他帖子中找到了一些评论,这些评论提到必须在B2C的自定义策略之外实现这样的解决方案,并使用Graph API设置密码并启用帐户。但我认为自定义策略的整个理念(以及固有的复杂性)是你可以基本上实现你能想到的任何流程。
有人做过类似的事情吗?
英文:
We have a membership model where public signup is disabled, and we use the Graph API to create new users. I'm struggling to find a solution using custom policies that will somehow generate a link that can be emailed to new users. Upon clicking the link, they should be directed to the change password form - completely bypassing the one-time code step. Once they've entered and confirmed their password, their account is activated and they may then log in.
I've looked at the sample flows but I can't find anything that matches. I've found a couple of comments in other threads that refer to having to implement such a solution outside of B2Cs custom policies, and use the Graph API to set the password and enable the account. But I thought the whole idea (and inherent complexity) of custom policies was that you could basically implement any kind of flow you can think of.
Anyone done something similar?
答案1
得分: 1
这可以通过电子邮件中包含的魔术链接来实现。所讨论的用户已包含在JWT中。
也参考这个链接。
一旦自定义策略收到链接,调用"LocalAccountWritePasswordUsingObjectId"。
英文:
The way to do this is via a magic link included in the email. The user in question is included in the JWT.
Refer this as well.
Once the custom policy has received the link, call "LocalAccountWritePasswordUsingObjectId".
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论