Skip to content

React Native starter project demonstrating OIDC authentication using React Native AppAuth Plugin.

Notifications You must be signed in to change notification settings

PlusAuth/plusauth-react-native-starter

Repository files navigation

PlusAuth React Native Starter Project

Simple React Native project demonstrates basic authentication flows with PlusAuth

Explore the PlusAuth React Native docs »

Table of Contents
  1. About The Project
  2. Prerequisites
  3. Installation
  4. Getting Started
  5. License
  6. What is PlusAuth

About The Project

It is a very simple React Native project demonstrating basic authentication flows such as register, login, and logout. To keep things simple, we used React Native AppAuth for authentication.

Prerequisites

Before running the project, you must first follow these steps:

  1. Create a PlusAuth account and a tenant at PlusAuth Dashboard
  2. Navigate to Clients tab and create a client of type Native Application
  3. Go to the details page of the client that you've just created and set the following fields as:
  • Redirect Uris: com.plusauth.reactnativeexample:/oauthredirect/login
  • Post Logout Redirect Uris: com.plusauth.reactnativeexample:/

Finally, note your Client Id and domain(e.g., https://example.plusauth.com) for app configuration on the next step.

Installation

  • Android Installation
cd plusauth-react-native-starter
npm install
# or with yarn
# yarn install
  • iOS Installation
cd plusauth-react-native-starter
npm install
# or with yarn
# yarn install
cd ios
pod install

Getting Started

First, we need to supply the required configuration values for the application. Rename the plusauth-env.example.js file as plusauth-env.js.

Then modify the values inside the plusauth-env.js file using your Client ID and your PlusAuth tenant name.

Run Application in Android Device

Start the Metro with:

npm run start
# or with yarn
yarn start

Finally, run the application on an Android device with:

npm run android
# or with yarn
yarn start

Run Application in iOS Device

Just hit the 'Run' button in XCode to start the app. The Metro will be started automatically.

License

This project is licensed under the MIT license. See the LICENSE file for more info.

What is PlusAuth

PlusAuth helps individuals, teams, and organizations to implement authorization and authentication systems in a secure, flexible and easy way.

Explore the PlusAuth Website »

Explore the PlusAuth Docs »

Explore the PlusAuth Forum »

About

React Native starter project demonstrating OIDC authentication using React Native AppAuth Plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published