desrodman / yii2-google-authenticator

为您的yii2应用程序提供谷歌认证器的两步验证

安装: 210

依赖者: 0

建议者: 0

安全性: 0

星标: 0

关注者: 0

分支: 5

类型:yii2-extension

dev-master 2024-09-20 12:56 UTC

This package is auto-updated.

Last update: 2024-09-20 12:56:42 UTC


README

添加到composer.json

"desrodman/yii2-google-authenticator": "@dev"

composer require --prefer-dist "desrodman/yii2-google-authenticator @dev"

一旦扩展安装完成,只需修改您的应用程序配置如下

'modules' => [

    ----------------

    'authenticator' => [
        'class' => 'desrodman\authenticator\Module',
        'twoStepVerification' => true,
    ],
],

--------------------

'bootstrap' => ['log', 'authenticator'],

迁移命令

yii migrate
php yii migrate --migrationPath=@desrodman/authenticator/migrations

您可以通过以下URL访问Next Authenticator

https:///path/to/index.php?r=authenticator/default/scan

或如果您已启用美观URL,可以使用以下URL

https:///path/to/index.php/authenticator/default/scan