Add Passage
Add Passage Flex to your React Native app
Prerequisites
- A Passage Flex app.
- An Android and/or iOS app in the Native Apps section of Passage Console for your Passkey Flex app.
Install
You can install Passage Flex React Native with npm or yarn:
Via NPM
npm i --save @passageidentity/passage-flex-react-native
Via yarn
yarn add @passageidentity/passage-flex-react-native
Import
To access Passage Flex methods, import the package.
import { PassageFlex } from '@passageidentity/passage-flex-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-flex-react-native"]
}
}
Run expo prebuild:
npx expo prebuild
React Native (non-Expo) configuration
** Native Android configuration (non-Expo) **
See Add Passage for Android to learn how to configure your app for Android.
** Native iOS configuration (non-Expo) **
See Add Passage for iOS to learn how to configure your app for iOS.