当前位置:网站首页>Three schemes for finclip to realize wechat authorized login
Three schemes for finclip to realize wechat authorized login
2022-07-25 05:20:00 【finogeeks】
With the breakthrough of wechat, a national application monthly 12 Billion , More and more users tend to choose wechat as the whole network login account , Therefore, wechat authorized login is used by many APP、 Applets are the first choice for third-party login authorization . 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 .
at present FinClip As in App The mainstream solution for running applets in , For migrating from wechat applet environment to FinClip The applet under has a rapid reuse wechat login process , And the need to realize wechat authorized login . This article focuses on sharing , stay FinClip In the environment , Several schemes for small programs to realize wechat authorized login .
Why does the applet need to be associated with wechat login ?
First of all, let's talk about the reason why small programs need to be associated with wechat login : If the developer chooses to put the developed applet on wechat first , You can call wx . login Get user identity , Quickly establish the user system of small programs . After that, if you want to migrate the applet to another App , The account system is facing reconstruction , Previously accumulated wechat users want to guide access to other platforms , It will be very inconvenient to log in with the original wechat account . Use FinClip After associated wechat login , Wechat login logic can be reused quickly , Authorize to obtain wechat account information , Help enterprises quickly divert from wechat to self built ecosystem .
FinClip Three schemes to realize wechat authorized login
Scheme 1 : Server transformation
Applicable scenario : Passed by the platform party FinClip Build your own Ecology ,FinClip Third party applets are running in the environment ( That is, the platform cannot modify the applet code ).
- First step : stay App By customizing API Inject wx.login Method , Return in the format of wechat applet code;
- The second step : There is no need to change the applet , According to the implementation on wechat , At this point code Send to the developer's server ;
- The third step : The developer server adapts , adopt code It can be judged that the login is from FinClip platform , from code Resolve in UserID, Just return the contents of your own account system .
Option two : Server transformation ( Arouse wechat authorization )
Use scenarios : Passed by the platform party FinClip Complete the splitting of its own functions , Small programs are developed by the platform side ( That is, the platform side can modify the applet code ).
- First step :SDK Integrated wechat development platform SDK;
- The second step : Use customization API Inject wx.login, You can get the return after arousing wechat authorization code, At this point, it may be necessary to code Splice unique identification ;
- The third step : There is no need to change the applet , According to the implementation on wechat , At this point code Send to the developer's server ;
- Step four : The server is based on code Unique identification , Call different authorization interfaces to obtain OpenID, Query login status returns ;
Limit : Because wechat restricts different subjects , Under different open platforms OpenID It's inconsistent , At this time, the applet needs to be associated with the same subject , Or the same open platform ( At this time, the unique identifier is UnionID).
Option three : Small program transformation
Applicable scenario : Make logical changes to the applet , When judging FinClip In the environment , Directly from wx.login Get the required information from ( That is, the platform side can modify the applet code ).
APP Use customization API Inject wx.login , Returns the current APP The login status of the user is ok .
In three scenes , This method is a little more complicated , The definition needs to be modified in the existing wechat applet , Thus making FinClip The applet has the ability of wechat login , Please refer to official documents for specific operation procedures : Wechat login function introduction
The effect is as follows :
FinClip Implementation effect of wechat authorized login
Applet generation app It can also easily realize wechat authorized login
be familiar with FinClip Of all know , Except in own App Outside the middle run applet . adopt FinClip Provided FIDE It can also generate wechat applets APP, For some companies with weak development ability , perhaps APP Projects with simple functional requirements are very fast and practical , You can click the development document to view the specific tutorial : Applet generation App
For this kind of transfer through applet app, It can also realize wechat authorized login , Method as above .
Recently I saw FinClip It has been launched SAAS edition , It's very versatile , Monthly 10000 Free release call , For our individual developers , This free adjustment is enough , It's also very cheap to buy traffic packages for the excess part , It's basically a fracture . If you are interested, you can go to the official website .
边栏推荐
- 基于云原生的私有化 PaaS 平台交付实践
- [cloud co creation] design Huawei cloud storage architecture with the youngest cloud service hcie (Part 1)
- Solution of win11 blue screen code 0x0000001a
- STM32 development note 117: generate IIR low-pass filter coefficients using MATLAB
- nacos中哪边有这个列的sql脚本啊?
- Unity LOD
- 自己实现is_base_of
- HMS Core Discovery第16期直播预告|与虎墩一起,玩转AI新“声”态
- epoll的实现原理
- js 页面增加过渡层
猜你喜欢

Introduction to kubernetes

ping命令

Three must know and know problems of redis

龙蜥社区发布首个 Anolis OS 安全指南 为用户业务系统保驾护航
![[globally unique ID] how to handle the ID primary key after dividing the database and table?](/img/a1/800ee868b74ce5d98956d4a0e2c075.png)
[globally unique ID] how to handle the ID primary key after dividing the database and table?

Docker builds MySQL master-slave replication

微信小程序相关操作示例

Execution process of NPM run XX

Implement is by yourself_ base_ of

微服务及相关组件概念
随机推荐
服务器防护的七个建议
Introduction to kubernetes
Build keyword driven automated testing framework
Learning records [email protected] R & D effectiveness measurement indicators
使用getifaddrs获取本机网口IP地址
STM32 Development Notes 118: using CMSIS DSP Library in stm32cube IDE
06. Libavdevice Library of ffmpeg
Shenzhen on call test, subject 4 on call test, subject 3 theory, second theory on call test instructions
[untitled]
Nexttick principle analysis
Redis的三个必知必会的问题
Pikachu vulnerability platform exercise
Implement is by yourself_ convertible
"Niuke | daily question" inverse Polish expression
What content does the software test plan include and how to write it. Share test plan template
Go language function
38 lines of PHP code free import database analysis Linux access log
DOM processing in ahooks
1310_一个printf的实现分析
2022-07-24: what is the output of the following go language code? A:[]int{}; B:[]int(nil); C:panic; D: Compilation error. package main import ( “fmt“ ) f