Skip to content

wedeploy-examples/auth-react-native-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeDeploy Auth Badge

An example of WeDeploy Auth on React Native.

Instructions

  1. Install the WeDeploy CLI.
  2. Clone this repository.
  3. Open the project with your command line and run we deploy -p yourproject.
  4. In your command line run npm install -g react-native-cli.
  5. Navigate to TestAuth folder and execute npm i.
  6. Load auth.js file in a text editor and replace <project-name> with the name of the project you choose in step 2 (yourproject). For example, if the project is called testrnauth, the data URL should look like auth-testrnauth.wedeploy.io.
  7. Setup app client id and client secret for this example application. It uses Google and GitHub as providers and you may read how to register your application to Google here and for GitHub here. Please be aware this example assumes the id and the secret are added using the Console.
  8. Run react-native run-ios or react-native run-android.

How to use Auth in React Native?

Using Auth API doesn't differ from using it on Web. However, for React Native two additional steps have to be performed:

  1. Define Custom URL scheme.
  2. Linking to interact with incoming and outgoing app links.

iOS

To set custom URL scheme and enable interacting with incoming and outgoing app links, check this commit.

For setting custom URL scheme you may refer to the official documentation

For Linking, check its official documentation.

Android

To set custom URL scheme and enable interacting with incoming and outgoing app links, check this commit.

For setting custom URL scheme you may refer to the official documentation

License

BSD-3-Clause, © Liferay, Inc.

About

An example of WeDeploy Auth on React Native

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •