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

2.5.1 2023-04-13 02:37 UTC

This package is auto-updated.

Last update: 2024-11-11 16:57:08 UTC


README

License Latest Stable Version

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

Links