Use the API from React Native
The@thefaithapp/auth-react-native package signs a member in through
TheFaithApp and sends authenticated v1 API requests from React Native and
Expo apps. Your app does not need to host a callback website.
Before you begin
You need:- an Expo SDK 57 app targeting iOS or Android
- its Android application ID and iOS bundle ID
- a client API key from
Settings > Developer Access
1
Add the package
Install the SDK and its Expo modules:
2
Add the config plugin
Add the SDK plugin and your application identifiers to The plugin adds the mobile callback to both native projects when you build
the app.
app.json:3
Register your React Native app
In the TheFaithApp dashboard:The dashboard creates the callback expected by the package:If iOS and Android use different identifiers, register both callbacks.
Avoid underscores because they cannot be used in a callback URI scheme.
- Open
Settings > Developer Access. - Click Add React Native app.
- Append
.thefaithappto your application ID. - Add the app and copy your client API key.
com.example.app, enter:4
Create a native build
Rebuild the app so the native callback configuration is included:Use a development build or standalone app for this flow. Expo Go cannot be
rebuilt with your application’s callback scheme.
5
Initialize the SDK
Provide the client key when creating Supply the value from your development or build environment instead of
committing it to source control.
TheFaithAppAuth:6
Sign in a member
Start sign-in from a button or another user action:The package returns to the app after hosted sign-in and stores the member
session securely.
7
Call a v1 endpoint
Use Pass another relative
authorizedFetch for protected API requests:/v1/... path to call endpoints from the API
Reference.Restore the saved session
Check for a saved session when the app starts:Access the bearer token
When an integration needs the token directly:Sign out
Revoke the member session and remove its saved copy:Handle SDK errors
Troubleshooting
Next steps
- Browse the endpoint groups in the API Reference navigation.
- Read Pagination and Errors before loading lists or adding retry behavior.
- Use the public standalone sample as a compact reference implementation.