ReachFive Developer Documentation

website·Indexed 33 days ago

https://developer.reachfive.com/docs/

Developer guides and API references for ReachFive and Purse Identity, including SDKs for Android, iOS, Core, and UI. Documentation covers social login integration with Amazon, identity API specifications, and implementation details for WebAuthn and account recovery.

Tokens
219.2K
Snippets
659
Records
1.5K
Agent score
56%

What's inside ReachFive

  1. Overview of Social Login integration with Purse Identity

    Purse Identity allows users to log in using various social providers. The general process for integrating a social provider involves two main steps: creating the Social Application within the provider's own platform and then configuring that application in the Purse Identity Console. If a required provider is not natively supported, a custom identity provider can be configured in the Purse Identity Console.
  2. Overview of Identity Fraud Protection (IFP)

    The Identity Fraud Protection (IFP) module analyzes login and signup attempts to detect suspicious IP behavior. When a suspicious IP is identified, it is flagged and blocked immediately.

    Key capabilities include:

    • Reducing the impact of credential stuffing attacks.
    • Preventing bots from performing bulk signup requests.
    • Blocking suspicious IPs immediately.
    • Whitelisting trusted IPs to bypass protection policies.
    • Automatic temporary suspension of accounts if a malicious IP successfully accesses an account (blocks password, OTP, Passkey, and SSO; social login remains usable).
  3. Understand OAuth 2.0 Scopes in Purse Identity

    Scopes are used to limit an application's access to a user's account. An application requests one or more scopes, which are presented to the user on a consent screen. The resulting access token is limited to the scopes granted by the user, ensuring that the application only accesses authorized data as per RFC 6749.
  4. Enable Data Breach Detection

    Data Breach Detection identifies leaked passwords by scanning known credential leaks and cross-referencing them with login, signup, or password update attempts. When a leak is detected, users can be temporarily suspended (if configured) and notified via email or SMS templates. This feature is enabled directly within the Purse Identity Console.
  5. Interpret ReachFiveError responses

    The ReachFiveError object provides detailed information about failed requests. Key properties include:

    • message: General error message.
    • code: The HTTP status code or SDK error code.
    • getErrorCode(): Returns the ErrorCode enumeration value.
    • data: A ReachFiveApiError object containing:
      • errorUserMsg: A translated, user-friendly error message.
      • errorMessageKey: The technical error code.
      • errorDescription: The technical error message.
      • errorDetails: A list of ReachFiveApiErrorDetails mapping specific fields to error messages.
  6. Reference ID token payload claims

    The idTokenPayload within the AuthResult object contains claims about the authenticated user. Key claims include:

    • sub: Unique subject identifier.
    • email / emailVerified: User's email and its verification status.
    • givenName / familyName / name: User's first, last, and full name.
    • gender: Allowed values are female, male, and other.
    • auth_time: Time of authentication.
    • newUser: Boolean indicating if the user is new.
    • picture / profile: URLs to the user's image and profile.
  7. ID Token Payload Claims Reference

    The idTokenPayload within the AuthResult contains claims about the authenticated user, including:

    • sub: Subject identifier
    • name: Full name
    • givenName: First name
    • familyName: Last name/surname
    • email: User email
    • emailVerified: Boolean indicating if email is verified
    • gender: female, male, or other
    • birthdate: User birthdate
    • locale: User locale
    • picture: User profile picture URL
    • newUser: Boolean indicating if the user is new
    • auth_time: Time of authentication
    • exp: Expiration time
    • iat: Issued at time
    • iss: Issuer
  8. Implement user-event webhooks

    User-event webhooks allow you to trigger external URLs when specific user actions occur (e.g., sign-up or account deletion). Purse Identity supports two types of webhooks:

    • Post-event webhooks: Triggered asynchronously after the event is processed. The API returns a response immediately, and the user is not blocked. This is the recommended type.
    • Pre-event webhooks: Triggered before the event is processed. These are synchronous and can be used to send additional data or prevent the event from proceeding. They suspend the API response, so a timeout (default 10 seconds) is critical to prevent user blockage.

    Pre-event Webhook Behavior on Failure:

    • Continue processing: The event proceeds as if no webhook existed (may lead to unsynchronized data).
    • Prevent processing: The event is blocked and an error is returned (ensures data consistency).
  9. Understand the ApiError structure

    The ApiError object provides detailed information about a failed request, including:

    • error: The main error message.
    • errorId: Unique identifier for the error.
    • errorUserMsg: A localized, user-friendly message (supports multiple languages including English, Spanish, French, German, Chinese, etc.).
    • errorMessageKey: The key used for the error message.
    • errorDescription: Technical details of the error.
    • errorDetails: An array of FieldError objects containing the specific field, message, and code for validation errors.
  10. Reference ID Token payload claims

    The idTokenPayload within the AuthResult contains claims about the authenticated user. Common claims include:

    • sub (string): Subject identifier.
    • name (string): Full name of the user.
    • givenName (string): First name.
    • familyName (string): Last name/surname.
    • email (string): User email address.
    • emailVerified (boolean): Whether the email is verified.
    • gender (string): Allowed values: female, male, other.
    • birthdate (string): User's birthdate.
    • locale (string): User's locale.
    • picture (string): URL to the user's profile picture.
    • newUser (boolean): Indicates if the user is new.
    • iss (string): Issuer of the token.
    • aud (string): Audience of the token.
    • exp (number): Expiration timestamp.
    • iat (number): Issued-at timestamp.
  11. Handle ReachFiveError in iOS SDK

    The ReachFiveError enum provides detailed information about failures during authentication and MFA processes.

    • AuthCanceled: The user canceled the request, no passkey was found, or a concurrent web login interrupted the process.
    • RequestError(apiError: ApiError): Occurs for Bad Request (HTTP 400) errors.
    • AuthFailure(reason: String, apiError: ApiError?): Occurs primarily for Unauthorized (HTTP 401) errors.
    • TechnicalError(reason: String, apiError: ApiError?): Occurs for Internal Server Errors (HTTP 500) or other internal failures.

    The nested ApiError object contains errorUserMsg (a localized, user-friendly message), errorId, errorMessageKey, and errorDescription.

  12. Retrieve authorized user information

    To get information about an authorized user, use the /identity/v1/userinfo endpoint. Alternatively, you can decode the id_token obtained after a successful login to retrieve the authorized attributes contained within the token.