Skip to main content

Prerequisites

You must be using React Native v0.64 or higher.

Installation

First, install the Rownd SDK for React Native.

Expo

You can find specific Expo installation instructions here.

Android

  1. Ensure the Sdk versions match or are above provided versions. File: android/build.gradle
  1. Install the Rownd library and dependencies.
  1. Check and update your ProGuard config using the rules from our Android SDK.
  2. Only required for Google Sign-in: Add a Rownd plugin initializer to your MainActivity file. File: *android/app/src/main/java/…/MainActivity.java

iOS

  1. Ensure iOS version is at least 14. File: ios/Podfile
  1. Install the Rownd pod and it’s dependencies

Enable deep linking

Rownd supports automatically signing-in users when they initially install your app or when they click a sign-in link when the app is already installed. Instructions for: iOS and Android

Usage

The Rownd SDK includes a context provider that will enable any component of your app to access authentication state and user data. Before you can use the SDK, you'll need to obtain an App Key from the Rownd Dashboard.
Later on within your app's components, you can use the Rownd hook to access the Rownd browser API:

API reference

Most API methods are made available via the Rownd Provider and its associated useRownd React hook. Unless otherwise noted, we're assuming that you're using hooks. requestSignIn() Trigger the Rownd sign in dialog
signOut() Sign out the user and clear their profile, returning them to a completely unauthenticated state.
getAccessToken() Retrieves the active, valid access token for the current user.
is_authenticated Indicates whether the current user is signed in or not.
access_token Represents the current access token for the user.
user Represents information about the current user, specifically their profile information. In the example below, we use the existing data to display the current value of first_name in a form field, update a local copy of that data as the user changes it, and then save the changes to Rownd once the user submits the form.
Merge data into the user profile
Set a specific field in the user profile