承接 kodal-uk/craft-email-2fa 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kodal-uk/craft-email-2fa

Composer 安装命令:

composer require kodal-uk/craft-email-2fa

包简介

Email based Two-factor authentication plugin for Craft CMS

README 文档

README

Email based Two-factor authentication plugin for Craft CMS

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require kodal/craft-email-2fa
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Email 2FA.

Restricting access to pages.

Include {{ requireTwoFactorLogin() }} in the template for pages you want to require two-factor authentication. Users will be redirected to the verify page link set in the plugin settings.

{{ requireTwoFactorLogin() }} also calls requireLogin so logged out users will be redirected to the login form and logged in users will be redirected to the verify form.

See Craft CMS documentation for login form example https://docs.craftcms.com/v3/dev/examples/login-form.html

Verify email form example.

<form method="post" accept-charset="UTF-8">
    {{ csrfInput() }}
    {{ actionInput('email-2fa/verify') }}
    <div>
        <label for="verifyCode">{{ 'Verification Code' | t }}</label>
        <div>
            {% for i in 1..craft.email2fa.verifyCodeLength %}
                <input type="number" min="0" max="9" name="verifyCode[]">
            {% endfor %}
        </div>
    </div>
    <div>
        <input type="submit" value="{{ 'Login' | t }}">
    </div>
</form>

Resend email form example.

Optionally add a resend email link.

<form method="post" accept-charset="UTF-8">
    {{ csrfInput() }}
    {{ actionInput('email-2fa/verify/resend') }}
    <div>
        <input type="submit" value="{{ 'Resend verify email' | t }}">
    </div>
</form>

Brought to you by Kodal

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固