The Example application can be used for development purpose of the SDK. To integrate with Auth0, it is better to use the Quickstart and Sample App applications
To run the example application inside the repository, follow these steps:
- Open a terminal or command prompt.
- Run
yarn bootstrapto set up the project. - Run
yarn cito build the project. - To run the application:
For Android, run
yarn example:android. For iOS, runyarn example:ios.
The application will be built and launched on the specified platform, allowing you to interact with it.
To run the web example, run yarn web from the example directory and open the served URL.
The app has no navigation. App.tsx (native) renders a single sectioned
ScrollView, one section per SDK feature group: Web Auth, Credentials Manager,
Direct Auth API (native only), Passwordless (native only), MFA, My Account,
Passkeys, and Advanced Tokens. App.web.tsx is a single file covering the
web-supported features only, with web-specific methods labelled inline.
Each native feature has two files under src/features/:
FeatureHooks.tsx— theuseAuth0()hooks approach. These are the files the app actually imports and renders.FeatureClass.tsx— the same feature written against theAuth0class instance (src/shared/api.ts), kept as unused side-by-side reference. Nothing imports these; they exist to show the class API next to the hooks API.
Platform-specific methods carry the platform in their label (e.g.
resumeSession (Android), cancelWebAuth (iOS), saveCredentials (Native only)).
There is no custom styling — only default React Native components with spacing.
- Change the
clientIdanddomainvalue inexample/src/auth0-configuration.js - For Android, Change the
android:hostvalues inexample/android/app/src/main/AndroidManifest.xml