Native Password Reset

With the Headless Forgot Password Flow, users can reset the password for their account by using a front-end experience that you customize. On the back end, your app calls the Headless Identity API’s Forgot Password Flow via an Experience Cloud site to reset the user’s password.

Before You Begin 

Before you set up a password reset flow, make sure that you completed the steps in Native Passwordless Login

Request a One-Time Password 

To start the password reset flow, request the delivery of a one-time password with this method from the native login manager object. 

iOS 

1SalesforceManager.shared.nativeLoginManager()
2      .startPasswordReset(
3        username: "your-username",
4        reCaptchaToken: "your-recaptcha-token")

Android 

1nativeLoginManager
2      .startPasswordReset(
3        username = "your-username",
4        reCaptchaToken = "your-recaptcha-token")

Submit Password Reset Request 

To reset the user’s password, use this method from the native login manager object. 

iOS 

1SalesforceManager.shared.nativeLoginManager()
2      .completePasswordReset(
3        username: "your-username",
4        otp: "your-otp",
5        newPassword: "your-password")

Android 

1nativeLoginManager
2      .completePasswordReset(
3        username = "your-username",
4        otp = "your-otp",
5        newPassword = "your-password")

For working examples of Headless Passwordless Login Flow on Mobile SDK, see the iOSNativeLoginTemplate or the AndroidNativeLoginTemplate on GitHub.

We've Moved

Welcome to the new home of the Mobile SDK Developer Guide! For now, the Japanese guide can be found in PDF form.