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

Commit ed8afeb

Browse files
authored
Update README.md
1 parent f4821d3 commit ed8afeb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,6 @@ class TwoFactorAuthController extends Controller
120120
protected $redirectTo = '/home';
121121
}
122122
```
123+
124+
## Errors and Exceptions
125+
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.

0 commit comments

Comments
 (0)