Skip to content

Commit 4ae0e4d

Browse files
committed
Merge branch 'development'
2 parents 52be05c + af6078c commit 4ae0e4d

File tree

12 files changed

+116
-106
lines changed

12 files changed

+116
-106
lines changed

CHANGELOG.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@ All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
55

6-
## [7.0.0] - 2020-06-26
6+
## [7.0.1] - 2020-06-28
77

8-
Started from scratch with a blank Laravel 7.* installation. This release is not an upgrade, and for that reason it is impossible to document all the changes that occurred. This version should be used for new projects.
8+
## Added
99

10-
### Added
10+
- Missing captcha functionality for login/register
1111

12-
### Removed
12+
## Changed
13+
14+
- Seed second role in production not just testing
15+
16+
## Removed
17+
18+
- Duplicate user tests
19+
- Terser in mix file
20+
21+
## [7.0.0] - 2020-06-26
22+
23+
Started from scratch with a blank Laravel 7.* installation. This release is not an upgrade, and for that reason it is impossible to document all the changes that occurred. This version should be used for new projects.
1324

1425
## [6.0.3] - 2020-02-17
1526

@@ -184,7 +195,8 @@ Started from scratch with a blank Laravel 7.* installation. This release is not
184195
- Fix yarn tests
185196
- Fix: Socially logged in users get assigned the default role
186197

187-
[Unreleased]: https://github.com/rappasoft/laravel-boilerplate/compare/v7.0.0...development
198+
[Unreleased]: https://github.com/rappasoft/laravel-boilerplate/compare/v7.0.1...development
199+
[7.0.1]: https://github.com/rappasoft/laravel-boilerplate/compare/v7.0.0...v7.0.1
188200
[7.0.0]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.3...v7.0.0
189201
[6.0.3]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.2...v6.0.3
190202
[6.0.2]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.1...v6.0.2

app/Domains/Auth/Http/Controllers/Frontend/Auth/LoginController.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Foundation\Auth\AuthenticatesUsers;
99
use Illuminate\Http\Exceptions\HttpResponseException;
1010
use Illuminate\Http\Request;
11+
use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules;
1112

1213
/**
1314
* Class LoginController.
@@ -54,6 +55,25 @@ public function showLoginForm()
5455
return view('frontend.auth.login');
5556
}
5657

58+
/**
59+
* Validate the user login request.
60+
*
61+
* @param \Illuminate\Http\Request $request
62+
* @return void
63+
*
64+
* @throws \Illuminate\Validation\ValidationException
65+
*/
66+
protected function validateLogin(Request $request)
67+
{
68+
$request->validate([
69+
$this->username() => 'required|string',
70+
'password' => PasswordRules::login(),
71+
'g-recaptcha-response' => ['required_if:captcha_status,true', 'captcha'],
72+
], [
73+
'g-recaptcha-response.required_if' => __('validation.required', ['attribute' => 'captcha']),
74+
]);
75+
}
76+
5777
/**
5878
* Overidden for 2FA
5979
* https://github.com/DarkGhostHunter/Laraguard#protecting-the-login.

app/Domains/Auth/Http/Controllers/Frontend/Auth/RegisterController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ protected function validator(array $data)
7676
'name' => ['required', 'string', 'max:255'],
7777
'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users')],
7878
'password' => PasswordRules::register($data['email'] ?? null),
79+
'g-recaptcha-response' => ['required_if:captcha_status,true', 'captcha'],
80+
], [
81+
'g-recaptcha-response.required_if' => __('validation.required', ['attribute' => 'captcha']),
7982
]);
8083
}
8184

composer.lock

Lines changed: 49 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/boilerplate.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
| Configurations related to the boilerplate's access/authorization options
1515
*/
1616
'access' => [
17+
'captcha' => [
18+
'registration' => env('REGISTRATION_CAPTCHA_STATUS', false),
19+
'login' => env('LOGIN_CAPTCHA_STATUS', false),
20+
],
21+
1722
'middleware' => [
1823
'confirm' => 'password.confirm:frontend.auth.password.confirm',
1924
'verified' => 'verified:frontend.auth.verification.notice',

0 commit comments

Comments
 (0)