Native User Registration

With the Headless Registration Flow, users can register for a new account by using a front-end experience that you customize. On the back end, your app calls the Headless Registration API via an Experience Cloud site to register and log the user in.

Before You Begin 

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

Request a One-Time Password 

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

iOS 

1SalesforceManager.shared.nativeLoginManager()
2      .startRegistration(
3        email: "your-email",
4        firstName: "your-first-name",
5        lastName: "your-last-name",
6        username: "your-username",
7        newPassword: "your-password",
8        reCaptchaToken: "your-recaptcha-token",
9        otpVerificationMethod: "your-verification-method")

Android 

1nativeLoginManager
2      .startRegistration(
3        email: "your-email",
4        firstName: "your-first-name",
5        lastName: "your-last-name",
6        username: "your-username",
7        newPassword: "your-password",
8        reCaptchaToken: "your-recaptcha-token",
9        otpVerificationMethod: "your-verification-method")

Log the User In 

To complete the registration request, log the new user in with this method from the native login manager object.

iOS 

1SalesforceManager.shared.nativeLoginManager()
2      .completeRegistration(
3        otp: "your-otp",
4        requestIdentifier: "your-request-id",
5        otpVerificationMethod: "your-verification-method")

Android 

1nativeLoginManager
2      .completeRegistration(
3        otp: "your-otp",
4        requestIdentifier: "your-request-id",
5        otpVerificationMethod: "your-verification-method")

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.