Installation

This guide explains how to install the Wepin React Native Provider

Requirements

  • Android API version 24 or newer is required.

  • iOS version 13 or newer is required.

This package is only available for Android and iOS environments. It is not supported on Web, macOS, Windows, or Linux environments.

Installation

It can be installed as an npm package.

npm install @wepin/provider-rn

peerDependencies

npm install react-native-device-info

# for ios
cd ios
pod install

Configuration

To enable OAuth login functionality, you need to configure the Deep Link Scheme.

Deep Link scheme format : wepin. + Your Wepin App ID

Android

When a custom scheme is used, Wepin Provider Library can be easily configured to capture all redirects using this custom scheme through a manifest placeholder in the file build.gradle(app):

// For Deep Link => RedirectScheme Format : wepin. + Wepin App ID
android.defaultConfig.manifestPlaceholders = [
  'appAuthRedirectScheme': 'wepin.{{YOUR_WEPIN_APPID}}'
]

iOS

You must add the app's URL scheme to the Info.plist file. This is necessary for redirection back to the app after the authentication process.

The value of the URL scheme should be 'wepin.' + your Wepin app id.

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>unique name</string>
        <array>
            <string>wepin + your Wepin app id</string>
        </array>
    </dict>
</array>

Last updated

Was this helpful?