PHPackages                             wnx/laravel-tfa-confirmation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. wnx/laravel-tfa-confirmation

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

wnx/laravel-tfa-confirmation
============================

Protect sensitive routes or actions with a confirmation-screen and ask for the two-factor authentication code of a user

v1.0.3(2mo ago)31845↓16.7%MITPHPPHP ^8.4CI passing

Since Dec 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/stefanzweifel/laravel-tfa-confirmation)[ Packagist](https://packagist.org/packages/wnx/laravel-tfa-confirmation)[ Docs](https://github.com/stefanzweifel/laravel-tfa-confirmation)[ GitHub Sponsors](https://github.com/stefanzweifel)[ RSS](/packages/wnx-laravel-tfa-confirmation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (12)Versions (8)Used By (0)

Ask for the two-factor authentication code of a user before accessing sensitive routes or actions.
==================================================================================================

[](#ask-for-the-two-factor-authentication-code-of-a-user-before-accessing-sensitive-routes-or-actions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8a7a9d29e395ab51f2dcdfda7ef8aaabeeb610e47d0922c4f2c9b97162c13b6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776e782f6c61726176656c2d7466612d636f6e6669726d6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wnx/laravel-tfa-confirmation)[![GitHub Tests Action Status](https://camo.githubusercontent.com/904d8fa6af442c02d68bab62a71dc30a866e4c5149a03b508f9abaae0583a4bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73746566616e7a77656966656c2f6c61726176656c2d7466612d636f6e6669726d6174696f6e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/stefanzweifel/laravel-tfa-confirmation/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ed2090f36f8293ad065998dc4cd1181e44988714bd17d8831bd6c08cac383324/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73746566616e7a77656966656c2f6c61726176656c2d7466612d636f6e6669726d6174696f6e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/stefanzweifel/laravel-tfa-confirmation/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/59778df1ffbf18d7e5b58dcf115effdc034f8573ec534a3ea15b7e7102c6a5d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746566616e7a77656966656c2f6c61726176656c2d7466612d636f6e6669726d6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wnx/laravel-tfa-confirmation)

Protect sensitive routes or actions with a confirmation-screen and ask for the two-factor authentication code of a user. Users are not asked for a confirmation again for a given time period. (Similar to the [Password Confirmation](https://laravel.com/docs/master/authentication#password-confirmation) feature of Laravel.)

The package uses [Laravel Fortify](https://laravel.com/docs/master/fortify) under the hood to confirm the two-factor authentication code.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require wnx/laravel-tfa-confirmation
```

You can publish the config file with:

```
php artisan vendor:publish --tag="tfa-confirmation-config"
```

This is the contents of the published config file:

```
