0.1.0 • Published 7 years ago

sso-acnapi v0.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

Getting Started

Git clone the project and navigate into the project

To run the app

Open 1 terminal and run npm start

Install the Expo app on your iOS or Android phone. Follow the instruction on the terminal to run the app on your phone.

To edit the code

If you already have an app.

Import SSOButton

import SSOButton from './SSOButton';

Include the SSOButton in your code in order to use it. You will also need to write a ssoLogin() method to handle the jwt token that is generated once your user successfully signed in.

<SSOButton sso_url={YOUR_SSO_URL)} redirect_url={YOUR_SSO_REDIRECT_URL} action={(jwt_token) => this.ssoLogin(jwt_token)} />

If you are starting a new project

Create a config.json file in 'src' folder where you store your sso_url and your sso_redirect url. For example:

{
  "url": {
    "sso_url": "YOUR_SSO_URL",
    "redirect_url": "YOUR_SSO_REDIRECT_URL",
    "check_expiry": "VALIDATE_TOKEN_URL (if have)"
  }
}

Open App.js to see how the SSOButton component is being imported and use.

Notes:

This project was bootstrapped with Create React Native App.

For more information, please visit https://github.com/react-community/create-react-native-app.

0.1.0

7 years ago