简体   繁体   English

如何在iOS应用中实现Azure AD B2C PasswordReset功能

[英]How to implement Azure AD B2C PasswordReset functionality in an iOS App

In a (Swift) iOS app that is using Azure AD B2C authentication, you can call the SignIn_Signup policy that opens a Safari browser where you can Login or Register a new account. 在使用Azure AD B2C身份验证的(Swift)iOS应用中,您可以调用SignIn_Signup策略,该策略打开一个Safari浏览器,您可以在其中登录或注册新帐户。 I would like this page to also have a Password Reset link. 我希望此页面也具有“密码重置”链接。

But when that link is clicked you can't return to the iOS app, catch the AADB2C90118 exception and call the PasswordReset policy in the same browser because the Safari browser is sandboxed. 但是,单击该链接后,您将无法返回iOS应用,无法捕获AADB2C90118异常并在同一浏览器中调用PasswordReset策略,因为Safari浏览器已被沙箱化。 (This is the way a windows app handles PasswordReset requests) (这是Windows应用程序处理PasswordReset请求的方式)

How can I call a PasswordReset policy from a link in the SignIn_Signup browserscreen in an iOS app? 如何在iOS应用程序的SignIn_Signup浏览器SignIn_Signup中的链接中调用PasswordReset策略?

I've looked at the iOS B2C sample with MSAL but it doesn't have a PasswordReset. 我看过带有MSAL的iOS B2C示例,但是它没有PasswordReset。

(a workaround would be to call the PasswordReset policy from a second button in the iOS app but I want it to be called from the Safari browser.) (一种解决方法是从iOS应用程序中的第二个按钮调用PasswordReset策略,但我希望从Safari浏览器中调用它。)

Btw, I am using Custom Policies because I have to do some server side validation. 顺便说一句,我正在使用自定义策略,因为我必须做一些服务器端验证。

Currently it is not possible to call a password reset policy without returning back to your app. 当前,如果不返回到您的应用程序,则无法调用密码重置策略。 You should vote for that feature though: aka.ms/aadb2cfeedback 您应该为此功能投票:aka.ms/aadb2cfeedback

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM