Skip to content

APP launches WeChat Mini Program

Scenario Introduction

  • Overview: GenAuth provides developers with a method for mobile applications to quickly launch WeChat Mini Programs and obtain user information and complete login through SDK. Through the GenAuth SDK, you can easily obtain the user identity provided by WeChat and quickly establish an account system based on mobile phone numbers.

  • Application scenario: Mobile APP

  • End user preview:

Notes

  • If you have not opened a GenAuth console account, please go to GenAuth console to register a developer account;

Step 1: Create a WeChat mobile application on WeChat Open Platform

Go to WeChat Open Platform to create a WeChat mobile application.

After the creation is complete, you need to record the AppID and AppSecret of the application, which will be used later.

Step 2: Associate the mini program in WeChat Open Platform

Go to WeChat Open Platform Admin Center->Mobile Application->Application Details->Associate Mini Program Information Page to associate the mini program.

Step 3: Create a WeChat mini program in WeChat Open Platform (optional)

By default, the default mini program provided by GenAuth will be used when the APP launches the mini program login. If you need stronger brand customization capabilities, or want to connect the WeChat account of the user who logs in through the mini program by scanning the code with your other WeChat public platforms, you need to apply for your own mini program. If you belong to one of these two scenarios:

Please follow the WeChat public platform instructions to create a WeChat mini program. You need to record the application's AppID and AppSecret, which will be needed later. At the same time, you need to contact us to obtain the source code of the mini-login. For details, please consult GenAuth after-sales service staff.

Step 4: Configure APP to launch the mini-program login in the GenAuth console

  1. Please click the "Create Social Identity Source" button on the "Social Identity Source" page of the GenAuth console to enter the "Select Social Identity Source" page.

  1. On the "Select Social Identity Source" page, click the "WeChat" card to enter the "WeChat Login Mode" page.

  1. Click the "APP Launches Mini Program" login mode, or click … Add to open the "APP Launches Mini Program" configuration page.

  1. On the "APP Launch Mini Program" configuration page, fill in the relevant field information.

FieldDescription
Unique IDa. The unique ID consists of lowercase letters, numbers, and -, and its length is less than 32 bits.
b. This is the unique ID of this connection and cannot be modified after setting.
Display NameThis name will be displayed on the button of the terminal user's login interface
Mini Program IDFill in if you choose to privatize the Mini Program
Mini Program SecretFill in if you choose to privatize the Mini Program
Login ModeAfter turning on "Login Only Mode", you can only log in to existing accounts and cannot create new accounts. Please choose carefully
  1. After the configuration is completed, click the "Create" or "Save" button to complete the creation.

Step 5: Development access

  • Recommended development access method: SDK

  • Pros and cons description: Easy access, only a few lines of code are needed. Highest degree of customization.

  • Detailed access method:

  1. Refer to the SDK developer access documentation Android and iOS.
  2. On the created "APP Launch Mini Program" identity source connection details page, open and associate a mobile app created in the GenAuth console.

  1. Go to the associated mobile app and experience the APP login function.

Agent infrastructure for identity, memory, and web action.