定制 elison/laravel_google_2fa 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elison/laravel_google_2fa

Composer 安装命令:

composer require elison/laravel_google_2fa

包简介

A Package for 2fa google authentication in Laravel Framework

README 文档

README

Package for 2fa Google authentication in Laravel Framework

Installation

composer require elison/laravel_google_2fa

Add the provider in the app.php

config/app.php

\Elison\GoogleAuthenticator\GoogleAuthenticatorProvider::class

Add table that stores the secret keys

php artisan migrate

Methods available

1. GoogleAuthenticator::generateQrCodeUrl($applicationName, $width, $height, $level) -> This method generates the QR Code which user needs to scan with Google Authenticator, and returns the secret key and qr code url

2. GoogleAuthenticator::setCredentials($userId, $secretKey) -> This method stores the secret key for the user that will be used later on, it may be used when the user has finished with code scanning

3. GoogleAuthenticator::checkIfTwoFaIsActive($userId) -> This method checks if the 2fa is active for the user, can be used to not display qr code again for an already authenticated user.

4. GoogleAuthenticator::verifyIfCodeIsValid($userId, $code) -> This method verifies if the code that the authenticated user enters is valid.

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-27