NativeLoginManager

Manage native login flow.

Types

Link copied to clipboard
data class StartRegistrationResult(val nativeLoginResult: NativeLoginResult, val email: String? = null, val requestIdentifier: String? = null)

A start registration result.

Properties

Link copied to clipboard

The username of the locked account or null. Can be used to pre-populate the username field or in a message telling the user which account biometric will unlock.

Link copied to clipboard

If the native login view should show a back button.

Functions

Link copied to clipboard
abstract suspend fun completePasswordReset(username: String, otp: String, newPassword: String): NativeLoginResult

Submits a request to complete a password reset to the Salesforce Identity API headless forgot password flow. This fulfills step four of the headless forgot password flow.

Link copied to clipboard
abstract suspend fun completeRegistration(otp: String, requestIdentifier: String, otpVerificationMethod: OtpVerificationMethod): NativeLoginResult

Submits a request to complete a user registration to the Salesforce Identity API headless registration flow. This fulfills step eight of the headless registration flow.

Link copied to clipboard

Use this function to get the intent for fallback web based authentication.

Link copied to clipboard
abstract suspend fun login(username: String, password: String): NativeLoginResult

Initiate a login with user provided username and password.

Link copied to clipboard

Presents the SDK's biometric authentication prompt to unlock the app. Call this when the app is in a biometric-locked state (i.e., biometricAuthenticationUsername is non-null) and the user wants to authenticate via biometric or device credential.

Link copied to clipboard
abstract suspend fun startPasswordReset(username: String, reCaptchaToken: String): NativeLoginResult

Submits a request to start a password reset to the Salesforce Identity API headless forgot password flow. This fulfills step one of the headless forgot password flow.

Link copied to clipboard
abstract suspend fun startRegistration(email: String, firstName: String, lastName: String, username: String, newPassword: String, reCaptchaToken: String, otpVerificationMethod: OtpVerificationMethod): NativeLoginManager.StartRegistrationResult

Submits a request to start a user registration to the Salesforce Identity API headless registration flow. This fulfills step four of the headless registration flow.

Link copied to clipboard
abstract suspend fun submitOtpRequest(username: String, reCaptchaToken: String, otpVerificationMethod: OtpVerificationMethod): OtpRequestResult

Submits a request to start password-less login via one-time-passcode to the Salesforce Identity API headless, password-less login flow. This fulfills step three of the headless, password-less login flow.

Link copied to clipboard
abstract suspend fun submitPasswordlessAuthorizationRequest(otp: String, otpIdentifier: String, otpVerificationMethod: OtpVerificationMethod): NativeLoginResult

Submits a request to complete a password-less login to the Salesforce Identity API headless, password-less login flow. This fulfills steps eight, eleven and thirteen of the headless password-less login flow.