hamcq / flarum-ext-auth-wechat
Allow users to log in with WeChat
Installs: 71
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 2
Open Issues: 0
Type:flarum-extension
Requires
- flarum/core: ^1.0.0
- fof/components: ^1.0.0
- hamcq/oauth2-wechat: ^1.0
- laravel/helpers: ^v1.4.1
- dev-master
- 1.2
- 1.1
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5.8
- 1.0.5.7
- 1.0.5.6
- 1.0.5.5
- 1.0.5.4
- 1.0.5.3
- 1.0.5.2
- 1.0.5.1
- 1.0.5
- 1.0.4
- 1.0.3.25
- 1.0.3.24
- 1.0.3.23
- 1.0.3.22
- 1.0.3.21
- 1.0.3.20
- 1.0.3.19
- 1.0.3.18
- 1.0.3.17
- 1.0.3.16
- 1.0.3.15
- 1.0.3.14
- 1.0.3.13
- 1.0.3.12
- 1.0.3.11
- 1.0.3.10
- 1.0.3.9
- 1.0.3.8
- 1.0.3.7
- 1.0.3.6
- 1.0.3.5
- 1.0.3.4
- 1.0.3.3
- 1.0.3.2
- 1.0.3.1
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is not auto-updated.
Last update: 2024-12-25 10:07:07 UTC
README
基于 https://github.com/NomisCZ/flarum-ext-auth-wechat 项目进行二次修改,支持移动端微信登录跳转,桌面端依旧支持二维码扫码登录
需要额外配置公众号APP_ID, APP_SEC
安装方式:
composer require hamcq/flarum-ext-auth-wechat
优化体验配置:
扫码登录后,已绑定的用户可以直接登录,未绑定的用户会提示注册账号,需要前往后台-外观-编辑自定义页脚,添加如下代码,完善使用体验:
<script>
window.onload = function () {
if(window.location.href.indexOf("wechat_user") != -1){
if(app.data.session.userId!=""){
window.location.href ="https://forum.hamcq.cn"
}
var log=JSON.parse(decodeURIComponent(window.location.href.split("=")[1]));
window.app.authenticationComplete(log);
window.app.alerts.show({type: 'warning'}, '未查询到绑定信息,请注册账号即可完成绑定');
}
};
</script>