当前位置:网站首页>Three schemes to realize finclip wechat authorized login
Three schemes to realize finclip wechat authorized login
2022-07-23 08:48:00 【Finbird】
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 realize Wechat authorization login requirements . 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.loginMethod , 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 :
Applet generation app It can also easily realize wechat authorized login
be familiar with FinClip Our friends 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 .
边栏推荐
- Is qiniu a safe securities company? Is it safe to open an account?
- 【OPENVX】对象基本使用之vx_node
- HCIP - - - BGP综合实验
- Binary tree expression evaluation~
- SolidWorks无法引用参考
- 自定义类型详解:结构体,枚举,联合
- Intel raid simulator Download
- Download and installation of mongodb
- After planning job hopping for nearly half a year, there were finally four interviews and three interviews
- DP+回溯分割回文串的系列问题
猜你喜欢

Nanoid? Better than UUID

babylon.js炫酷canvas背景动画js特效

Download and installation of mongodb

PKS Secretary & brother | review the past and know the new

HCIP第九天笔记(OSPF的路由回馈、路由策略、以及配置指南)

MySQL 分库分表及其平滑扩容方案
![[hero planet July training leetcode problem solving daily] the 22nd day of the orderly gathering](/img/db/aaff170119727c0c9a02c4c3a3d8d7.png)
[hero planet July training leetcode problem solving daily] the 22nd day of the orderly gathering

NanoID 了解一下?比 UUID 更好用

Intel raid simulator Download

On the stability of common sorting
随机推荐
做对的事情,把事情做对
创业文档:催款函怎么写
二叉树遍历
不同where条件合并输出
Since I used the hiflow scene connector, I don't have to worry about becoming a "drowned chicken" anymore
吆喝一声就解决了
What is the value of the new meta universe layout "primitive Cube" of "crazy diners"?
【GNN报告】香港科技大学李佳:图异常检测再思考—我们究竟需要怎样的图神经网络?
Okaleido tiger NFT即将登录Binance NFT平台,你期待吗?
触发器基础知识(下)
ospf综合实验配置
day3 poc与exp学习之pikachu带token的暴力破解
工控人,你真的了解你的五险一金吗?
SQL中DDL和DML的基本操作(数据库)
svg+js鼠标悬浮视差js特效
Redis速成
[openvx] VX for basic use of objects_ graph
Redis Express
Swift - red modifier
Talking about network security architecture design (I)
