Changes the associatation key type to the user which is the WeChat unionid
Fix the missing scope parameter while aquiring token against WeChat server
Hack the data persistence layer in order to unify the WeChat client and others
In order to use this old backend, you should configure your python application as
the following(for instance, django website):
enable WeixinOAuth2, WeixinOAuth2APP backends in you application.
setup scope for each auth backend in other settings, e.g. "scope": "snsapi_userinfo"
make sure WeixinOAuth2APP is invisible to user in you view
change you auth url dynamiclly by javascript, e.g.
let documentReadyStateCheck = setInterval(() => {
if (document.readyState === 'complete') {
clearInterval(documentReadyStateCheck);
let agent = navigator.userAgent.toLowerCase();
let providerUrl = '/auth/login/weixinapp/?auth_entry=login&next=%2Fdashboard';
if (/micromessenger/.test(agent)) {
document.getElementById('oa2-weixin')
.setAttribute('data-provider-url', providerUrl);
}
}
}, 100);
This commit applied with the following changes:
change you auth url dynamiclly by javascript, e.g.
let documentReadyStateCheck = setInterval(() => { if (document.readyState === 'complete') { clearInterval(documentReadyStateCheck); let agent = navigator.userAgent.toLowerCase(); let providerUrl = '/auth/login/weixinapp/?auth_entry=login&next=%2Fdashboard'; if (/micromessenger/.test(agent)) { document.getElementById('oa2-weixin') .setAttribute('data-provider-url', providerUrl); } } }, 100);