An example of WeDeploy Auth on React Native.
- Install the WeDeploy CLI.
- Clone this repository.
- Open the project with your command line and run
we deploy -p yourproject
. - In your command line run
npm install -g react-native-cli
. - Navigate to
TestAuth
folder and executenpm i
. - 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 calledtestrnauth
, the data URL should look likeauth-testrnauth.wedeploy.io
. - 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.
- Run
react-native run-ios
orreact-native run-android
.
Using Auth API doesn't differ from using it on Web. However, for React Native two additional steps have to be performed:
- Define Custom URL scheme.
- Linking to interact with incoming and outgoing app links.
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.
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
BSD-3-Clause, © Liferay, Inc.