You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,34 @@ You can change the URL by setting this option:
77
77
78
78
It runs under the `web` middleware since it uses the session to keep you logged in. You can change the middleware if needed in the [configuration file](#publish-configuration-file).
79
79
80
+
## Throttle Login Attempts
81
+
82
+
To prevent malicious users from brute forcing passwords, login attempts will be throttled unless you disable it. You can change the number of failed attempts per minute to allow, and the delay (in minutes) that users have to wait after reaching the maximum failed attempts.
When you tried to login too many times, Laravel's 429 error page will be shown. You can easily modify this by creating a `429.blade.php` view in `resources/views/errors`. To save you a little time, I have included a localized template you can include in that page:
91
+
92
+
```blade
93
+
@include('stagefront::429')
94
+
```
95
+
96
+
If you want to include a different partial for other throttled pages, you can check the request:
97
+
98
+
```blade
99
+
@if (request()->is(config('stagefront.url')))
100
+
@include('stagefront::429')
101
+
@else
102
+
@include('your.partial.view')
103
+
@endif
104
+
```
105
+
106
+
Text in this view can be changed via the [translation files](#translations-and-views).
107
+
80
108
## Ignore URLs
81
109
82
110
If for any reason you wish to disable StageFront on specific routes, you can add these to the `ignore_urls` array in the [configuration file](#publish-configuration-file). You can use wildcards if needed. You can't set this in the `.env` file.
@@ -112,7 +140,7 @@ php artisan vendor:publish
112
140
113
141
Each option is documented.
114
142
115
-
## Translations & Login View
143
+
## Translations and Views
116
144
117
145
You can publish the translations to quickly adjust the text on the login screen and the errors. If you want to customize the login page entirely, you can also publish the view.
0 commit comments