Prerequisites
You must be using React Native v0.64 or higher. Must be an ejected Expo app which can be bare React Native or use an Expo development build. Instructions for bare React Native app can be found here.Installation
First, install the Rownd SDK for Expo.Expo development
- Add
@rownd/react-nativeas a plugin to yourapp.jsonfile.
- Install Expo BuildProperties to set iOS/Android versions
- Add
expo-build-propertiesas a plugin to yourapp.jsonfile. Ensure the Sdk versions match or are above provided iOS/Android versions.
- (optional) Enable Apple sign-in for iOS in your
app.jsonfile.
- (optional) Enable Google sign-in for iOS. Add your Google IOS Client ID client as a URL Scheme in your
app.jsonfile.
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. Follow instructions below to setup.- Visit the Rownd platform and go to the Sign-in methods page. Open the Mobile app settings modal and (1) create a subdomain and (2) fill out the iOS/Android settings.
-
Enable deep linking for Expo using
app.jsonand<subdomain>created in the Rownd platform.
These settings might only apply at the time the native projects were generated. Try deleting the ios/android folders and rebuilding the project.
app.json
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.API reference
Most API methods are made available via the Rownd Provider and its associateduseRownd React hook. Unless otherwise noted, we're assuming that you're using
hooks.
requestSignIn()
Trigger the Rownd sign in dialog
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.