Add Passage

Add Passage to your React Native app

Prerequisites

If you don’t already have a React Native project and just want to try out Passage, consider cloning our React Native Example App.

Install

You can install Passage React Native with npm or yarn:

Via NPM

npm i --save @passageidentity/passage-react-native

Via yarn

yarn add @passageidentity/passage-react-native

iOS cocoapod

For non-Expo apps:

cd ios && pod install

Import

To access Passage methods, import the package.

import { Passage } from '@passageidentity/passage-react-native';

Expo configuration

Add your associated domain to your .env:

ASSOCIATED_DOMAIN=example.com

Add the plugin in your app.json:

{
    "expo": {
        "plugins": ["@passageidentity/passage-react-native"]
    }
}

Run expo prebuild:

npx expo prebuild

React Native (non-Expo) configuration

** Native Android configuration (non-Expo) **

Follow the Android cross platform configuration guide.

** Native iOS configuration (non-Expo) **

Follow the iOS cross platform configuration guide.