This repo demonstrates how to add authentication to an React Native app using Authgear.
-
Goto https://portal.authgear.com and create a free account (or login to your existing account).
-
Then navigate to Applications and create a new client application of type Native App.
Download/clone the code from this repo then update the configuration.
The project needs to be configured with your Authgear client application's Endpoint and Client ID in order for the authentication flow to work.
To do this, create a .env
file in the root directory of the project then copy and paste the content of .env.template
to it.
Add the values for your own Authgear client application's Client ID and Endpoint in the corresponding key.
To run this example app, add the following URI to your Authgear client application's Authorized Redirect URI:
com.authgear.example.rn://host/path
To test the app on iOS or Android, run the following commands: Install dependencies
npm install
(cd ios && pod install)
Run on iOS
npm run ios
Run on Android
npm run android
Authgear is a highly adaptable identity-as-a-service (IDaaS) platform for web and mobile applications. Authgear makes user authentication easier and faster to implement by integrating it into various types of applications - from single-page web apps to mobile applications to API services.
- Zero trust authentication architecture with OpenID Connect (OIDC) standard.
- Easy-to-use interfaces for user registration and login, including email, phone, username as login ID, and password, OTP, magic links, etc for authentication.
- Support a wide range of identity providers, such as Google, Apple, and Azure Active Directory (AD).
- Support biometric login on mobile, Passkeys, and Multi-Factor Authentication (MFA) such as SMS/email-based verification and authenticator apps with TOTP.
View other Authgear Documentation at https://docs.authgear.com/