React Native
This tutorial demonstrates how to add user login to an React Native with Expo application using BlitzWare.
1) Configure BlitzWare
Get Your Application Keys
You will need some details about your application to communicate with BlitzWare. You can get these details from the Application Settings section in the BlitzWare dashboard.

You need the Client ID.
Configure Redirect URIs
A redirect URI is a URL in your application where BlitzWare redirects the user after they have authenticated. The redirect URI for your app must be added to the Redirect URIs list in your Application Settings under the Security tab. If this is not set, users will be unable to log in to the application and will get an error.
2) Install the BlitzWare React Native SDK
Run the following command within your project directory to install the BlitzWare React Native SDK:
Prerequisites
This SDK requires Expo and the following dependencies:
expo-auth-session- For OAuth 2.0 authenticationexpo-secure-store- For secure token storage
If using Expo managed workflow, these are included. For bare React Native, install them separately.
Platform Setup
iOS Setup
Add URL scheme to your
app.jsonorapp.config.js:
Android Setup
The URL scheme in app.json automatically configures Android intent filters in Expo managed workflow.
For bare React Native, add to android/app/src/main/AndroidManifest.xml:
3) Implementation Guide
Follow this step-by-step guide to implement authentication in your app.
Step 1: Configure the Provider
Wrap your app with the BlitzWareAuthProvider at the root level:
Step 2: Basic Authentication
Create your main authentication screen:
Step 3: Advanced Features - Session Validation
Add session validation for enhanced security:
Step 4: Access Token Management
Get access tokens for API calls:
Step 5: Role-Based Access Control
Implement role-based features:
That's it!
Last updated