startPasswordless

client.startPasswordless(
  email,
  phoneNumber
  success,
  failure,
  activity,
  // Optional arguments
  redirectUri,
  captcha,
  PasswordlessSignupData
)

About this command

Starts a passwordless flow by sending an email or an SMS to the profile with a single-use auth code.

Examples

  • With an email

  • With a phone number

  • With profile data

import com.reach5.identity.sdk.core.models.Profile

client.startPasswordless(
    email = "john.doe@email.com",
    redirectUri = "reachfive-${clientId}://callback",
    success = { _ -> ... }, // Do something
    failure = { error -> ... }, // Handle a ReachFive error
    activity = activity
)
import com.reach5.identity.sdk.core.models.Profile

client.startPasswordless(
    phoneNumber = "+33612345678",
    redirectUri = "reachfive-${clientId}://callback",
    success = { _ -> ... }, // Do something
    failure = { error -> ... }, // Handle a ReachFive error
    activity = activity
)
import co.reachfive.identity.sdk.core.models.requests.PasswordlessSignupData

client.startPasswordless(
    email = "john.doe@email.com",
    redirectUri = "reachfive-${clientId}://callback",
    success = { _ -> ... }, // Do something
    failure = { error -> ... }, // Handle a ReachFive error
    activity = activity,
    data = PasswordlessSignupData(
        givenName = "John",
        familyName = "Doe",
        phoneNumber = "+33612345678",
        customFields = mapOf("favorite_color" to "blue")
    )
)

Parameters

email string

The email address of the profile.

phoneNumber string

The phone number of the profile.

Both the international format and the national conventions of the account’s country are accepted if configured in account settings.

redirectUri string

The URL where the user will be redirected after the passwordless success.

Default value is reachfive-${clientId}://callback.

failure function

Callback called once the request has failed. You’ll get a ReachFiveError as an argument.

success function

Callback called once the request has succeeded.

activity Activity

The Android activity.

captcha CaptchaToken

A captcha token and the provider that issued it.

Pass a ReCaptchaToken, ReCaptchaEnterpriseToken or a CaptchaFoxToken.

This parameter is required when the Purse Identity Console protects the endpoint with a Captcha. The Purse Identity Android SDK forwards the token and does not show a challenge or fetch a token. Get the token from Google reCAPTCHA or CaptchaFox in your app, then pass it here.

Enable Captcha in the Purse Identity Console at reCAPTCHA or CaptchaFox.

data PasswordlessSignupData

optional The data recorded on the profile if the flow resolves to a signup.

email string

An email address of the profile.

phoneNumber string

A phone number of the profile.

customIdentifier string

A string that allows users to authenticate with something other than an email or phone_number. Each custom_identifier value must be unique. The custom_identifier must be between 4-80 characters.

givenName string

The given name of the profile.

middleName string

The middle name of the profile.

familyName string

The family name of the profile.

name string

The full name of the profile.

nickname string

The nickname of the profile.

birthdate string

The birthdate of the profile, represented as an ISO 8601 YYYY-MM-DD format.

profileURL string

The URL of one of the user’s profile pages (usually a social provider’s page).

picture string

The URL of one of the user’s profile pictures. This URL refers to an image file (PNG, JPEG, or GIF image file).

username string

The username of the profile (the login’s name).

gender string

The gender of the profile.

company string

The company name of the profile.

addresses ProfileAddress[]

The list of the profile’s postal addresses.

locale string

The profile’s language code in lowercase and country code in uppercase, separated by a dash (eg en, fr-FR …​).

bio string

The biography of the profile.

customFields Map<string, any>

The custom fields of the profile.

consents Map<string, Consent>

The consents granted to the profile. It is a map of string keys with the associated consent object.

Response

Type: Unit

ReachFiveError

message string

The message of the error.

getErrorCode() ErrorCode

The error code’s enumeration value.

code string

The HTTP status code or SDK error code.

See Android SDK errors for more details.

exception string

The stack trace of the error.

data ReachFiveApiError

Additional data about the error.

error string

The main error message.

errorId string

The identifier of the error.

errorUserMsg string

The user-friendly error message.

This property is translated according to the user’s browser settings. Currently supported languages:
Currently supported languages
  • ar - العربية Arabic

  • de - Deutsch German

  • en - English

  • es - Español Spanish

  • fr - Français French

  • hu - Magyar Hungarian

  • it - Italiano Italian

  • jp - 日本 Japanese

  • ko - 한국인 Korean

  • nl - Nederlands Dutch

  • pt - Portuguese

  • ru - Ру́сский Russian

  • sk - Slovenský Slovak

  • zh-CN - People’s Republic of China Simplified Chinese

  • zh-Hans - Simplified Chinese

  • zh-Hant - Traditional Chinese

  • zh-HK - Hong Kong Traditional Chinese

  • zh-MO - Macao Traditional Chinese

  • zh-SG - Singapore Simplified Chinese

  • zh-TW - Taiwan Traditional Chinese

errorMessageKey string

The technical error code.

errorDescription string

The technical error message.

errorDetails ReachFiveApiErrorDetails

  • field - The field concerned by the error.

  • message - The message error returned for the field.

AI Assistant

Confirm Deletion