hehongyuanlove / flarum-auth-qq
Allow users to log in with QQ
Installs: 909
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 0
Forks: 11
Open Issues: 3
Type:flarum-extension
Requires
- ext-json: *
- flarum/core: *
- league/oauth2-client: ^2.2
This package is auto-updated.
Last update: 2024-11-11 16:57:08 UTC
README
A Flarum extension. Allow users to log in with QQ
重要说明
- 用户名进行规范(允许汉字)
- 随机生成用户名
- 自动设置邮箱账号 同时密码也为邮箱账号 且自动激活邮箱
- 邮箱与密码相同
关于注册时邮箱用户名部分
有其他需求 自行修改vendor/hehongyuanlove/flarum-auth-qq/src/QQAuthController.php
$username = $this->RandomUserName();
$random_email = $username. "@xxxxx.cn";
$nickname = $this->UserNameMatch($userinforesult["nickname"]) . str::upper(str::random(4));
$registration
->provide("username", $username)
->provide("nickname", $nickname)
->provide("email", $random_email)
->provide("is_email_confirmed", 1)
->provide("password", $random_email)
->provideAvatar($userinforesult['figureurl_qq_2'])
->setPayload($userinforesult);
参考
Copy from nomiscz/flarum-ext-auth-wechat
QQ互联回调地址
安装
Use Bazaar or install manually with composer:
composer require hehongyuanlove/flarum-auth-qq # 有兼容提示就 composer require hehongyuanlove/flarum-auth-qq:*
更新
composer update hehongyuanlove/flarum-auth-qq