Installation

This guide explains how to install the Wepin Flutter Login Library.

Requirements

  • Android: API version 21 or higher

  • iOS: Version 13.0 or higher

    • Update the platform :ios version to 13.0 in your Flutter project’s ios/Podfile, and verify and modify the ios/Podfile as needed.

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

Installation

The Wepin Flutter Login Library is published on pub.dev, and you can install it by adding the following command or by adding a dependency in your app's pubspec.yaml.

  • Add using Flutter pub add command:

$ flutter pub add wepin_flutter_login_lib
  • Add to dependencies in pubspec.yaml:

dependencies:
    wepin_flutter_login_lib: ^0.0.1

Configuration

To enable OAuth login functionality (loginWithOauthProvider), you need to configure the Deep Link scheme.

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

Android

  • Add manifestPlaceholders to the build.gradle (app) file to easily capture all redirects using this custom scheme with the Wepin Widget SDK.

build.gradle(app)
// Deep Link configuration => Redirect scheme format: wepin. + Wepin App ID
android.defaultConfig.manifestPlaceholders = [
  'appAuthRedirectScheme': 'wepin.{{YOUR_WEPIN_APPID}}'
]

iOS

  • Add the app’s URL scheme to the Info.plist file to redirect back to the app after the authentication process.

Info.plist
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>unique name</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>wepin.{{YOUR_WEPIN_APPID}}</string>
        </array>
    </dict>
</array>

Last updated