Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit c662d8f

Browse files
committed
wp
1 parent 0d75df6 commit c662d8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Latest Unstable Version](https://poser.pugx.org/michaeldzjap/twofactor-auth/v/unstable)](//packagist.org/packages/michaeldzjap/twofactor-auth)
44
[![License](https://poser.pugx.org/michaeldzjap/twofactor-auth/license)](https://packagist.org/packages/michaeldzjap/twofactor-auth)
55

6-
# Two-Factor-Authentication
6+
# laravel-two-factor-authentication
77
A two-factor authentication package for Laravel >= 5.5
88

99
## Description
@@ -173,7 +173,7 @@ class TwoFactorAuthController extends Controller
173173
```php
174174
...
175175
<form class="form-horizontal" role="form" method="POST" action="{{ route('login') }}">
176-
{{ csrf_field() }}
176+
@csrf
177177

178178
{{-- Add this block to show an error message in case of an expired token or user lockout --}}
179179
@if ($errors->has('token'))
@@ -211,3 +211,6 @@ TWO_FACTOR_AUTH_DRIVER=dummy
211211

212212
## Errors and Exceptions
213213
Unfortunately the *MessageBird* php api throws rather generic exceptions when the verification of a token fails. The only way to distinguish an expired token from an invalid token is by comparing their error messages, which obviously is not a very robust mechanism. The reason this is rather unfortunate is because in the case of an invalid token we want to give the user at least a few (3) changes to re-enter the token before throttling kicks in, whereas in the case of an expired token we just want to redirect to the login screen right away.
214+
215+
## Testing
216+
An example project including unit and browser tests can be found [here](https://github.com/michaeldzjap/laravel-two-factor-authentication-example).

0 commit comments

Comments
 (0)