Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.47 KB

README.md

File metadata and controls

55 lines (41 loc) · 1.47 KB

React Native App Auth Example

Demo

Running the example apps

After cloning the repository, run the following:

# Install the npm dependencies for the monorepo
cd react-native-app-auth
yarn

cd /examples/demo
# Install the pods for the iOS example app
cd ios && pod install && cd ..
# Install the pods for the macOS example app
cd macos && pod install && cd ..

# From here on, you'll need two terminals.

# [In terminal A]
# Start the Metro bundler
yarn start

# [In terminal B]
# Run the iOS app
yarn ios

# or:
# Run the Android app
yarn android

# or:
# Run the macOS app (after setting `applePlatform = "macos"` in metro.config.js)
yarn macos

Notes

  • If you have difficulty getting the emulator to connect, open the project from Android Studio (for Android) or Xcode (for iOS/macOS) and run it through there.
  • ANDROID: When integrating with a project that utilizes deep linking (e.g. React Navigation deep linking), update the redirectUrl in your config and the appAuthRedirectScheme value in build.gradle to use a custom scheme so that it differs from the scheme used in your deep linking intent-filter as seen here.

Example:

// build.gradle
android {
  defaultConfig {
    manifestPlaceholders = [
      appAuthRedirectScheme: 'io.identityserver.demo.auth'
    ]
  }
}