yeesoft / yii2-yee-auth
Yee CMS 授权模块
0.1.0
2017-03-01 10:53 UTC
Requires
- yeesoft/yii2-yee-core: ~0.1.0
- yeesoft/yii2-yee-user: ~0.1.0
- yiisoft/yii2-authclient: ~2.1.0
This package is auto-updated.
Last update: 2022-03-29 00:25:19 UTC
README
##Yee CMS - Auth 模块
####前端授权模块
此模块是 Yee CMS(基于 Yii2 框架)的一部分。
此模块实现了用户注册、授权、社交授权、密码恢复等功能。
安装
运行以下命令之一:
composer require --prefer-dist yeesoft/yii2-yee-auth "~0.1.0"
或
"yeesoft/yii2-yee-auth": "~0.1.0"
将以下内容添加到您的 composer.json
文件的 require 部分中。
运行迁移
yii migrate --migrationPath=@vendor/yeesoft/yii2-yee-auth/migrations/
配置
- 在前端配置文件中
'modules'=>[ 'auth' => [ 'class' => 'yeesoft\auth\AuthModule', ], ], 'components' => [ 'authClientCollection' => [ 'class' => 'yii\authclient\Collection', 'clients' => [ 'google' => [ 'class' => 'yii\authclient\clients\Google', 'clientId' => '*****', 'clientSecret' => '*****', ], 'facebook' => [ 'class' => 'yii\authclient\clients\Facebook', 'clientId' => '*****', 'clientSecret' => '*****', ], 'twitter' => [ 'class' => 'yii\authclient\clients\Twitter', 'consumerKey' => '*****', 'consumerSecret' => '*****', ], ], ], ],