当前位置:网站首页>A method of quickly reusing wechat login authorization in app

A method of quickly reusing wechat login authorization in app

2022-06-12 17:46:00 speedoooo

Under wechat applet , The applet login function will generally be through OpenID or UnionID As a unique identifier , Connect with the account system of the applet service , Complete the construction and design of user account system .

If in a small program like Alipay 、 The third-party platform of Baidu applet has developed the applet , It is still troublesome to realize wechat authorized login , For example, before FinClip Developed a small program , It is found that the login to realize wechat authorization can only be realized through App Custom in API Inject wx.login To transform the service end .

Take a look at their logic diagram in the document , There's some trouble , Also give you a feeling :

To be honest, I tried to spend oneortwo days groping for several times , The process is still troublesome , Big workload , There are also more or less reports of errors .

But recently I saw FinClip In addition to other solutions , Moreover, the ability of small programs to reuse wechat login can be realized without using code . Specifically, log in FinClip Management background , Click on 【 Applet - details - Third party management - Associated wechat applet login 】, Enter the wechat applet original ID, After the corresponding authorization page uploaded in the wechat applet , Just bind .

It can be said that it has saved our patients with advanced cancer , Let's take a look at it in detail according to the actual operation :

First step : Sign in FinClip Management backstage

The second step : stay “ Applet management ” find : My applet >> Applet details >> Third party management .

The third step : Will be made by FinClip The designed applet authorization page is added to the existing applet code package and submitted for review , The official authorization page has been directly placed in GitHub, You can get it directly https://github.com/finogeeks/wechat-auth-page

Step four : Next step , Click add login Association on the management background page , Fill in... As prompted “ Wechat applet is original ID”、“ Wechat applet nickname and avatar authorization page path ”、“ Path to the authorization page of the applet mobile number ”.

These steps are followed , All the work is finished , Also let me show you the actual situation of my small program .

The above is to let the developers have their own App The applet can realize the third-party wechat authorized login method , It is also convenient to match the user account of wechat applet with your own App Get through the user account experience , Unified operation management .

Of course, if you want to know how to make yourself App Able to run small programs can be used directly FinClip Applet container technology , Their official website has a detailed introduction and description .

原网站

版权声明
本文为[speedoooo]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206121742504464.html