@@ -50,14 +50,14 @@ |
||
| 50 | 50 | try { |
| 51 | 51 | // Create a cookie instance with proper settings for persistence |
| 52 | 52 | $cookie = cookie( |
| 53 | - '2fa_trusted_device', // name |
|
| 54 | - $cookieValue, // value |
|
| 55 | - 60 * 24 * 30, // minutes (30 days) |
|
| 56 | - '/', // path |
|
| 57 | - null, // domain (null = current domain) |
|
| 58 | - null, // secure (auto) |
|
| 59 | - false, // httpOnly - allow JS access |
|
| 60 | - false, // raw |
|
| 53 | + '2fa_trusted_device', // name |
|
| 54 | + $cookieValue, // value |
|
| 55 | + 60 * 24 * 30, // minutes (30 days) |
|
| 56 | + '/', // path |
|
| 57 | + null, // domain (null = current domain) |
|
| 58 | + null, // secure (auto) |
|
| 59 | + false, // httpOnly - allow JS access |
|
| 60 | + false, // raw |
|
| 61 | 61 | 'lax' // sameSite |
| 62 | 62 | ); |
| 63 | 63 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | $rememberMe = $request->has('rememberme') && $request->input('rememberme') === 'on'; |
| 86 | 86 | |
| 87 | - if (! $user->isVerified() || $user->isPendingVerification()) { |
|
| 87 | + if (!$user->isVerified() || $user->isPendingVerification()) { |
|
| 88 | 88 | $request->session()->flash('message', 'You have not verified your email address!'); |
| 89 | 89 | |
| 90 | 90 | return redirect()->to('login'); |
@@ -204,14 +204,14 @@ discard block |
||
| 204 | 204 | if ($remainingMinutes > 0) { |
| 205 | 205 | // Create a cookie with proper settings for persistence |
| 206 | 206 | $cookie = cookie( |
| 207 | - '2fa_trusted_device', // name |
|
| 208 | - $trustedDeviceCookie, // value |
|
| 209 | - $remainingMinutes, // minutes remaining |
|
| 210 | - '/', // path |
|
| 207 | + '2fa_trusted_device', // name |
|
| 208 | + $trustedDeviceCookie, // value |
|
| 209 | + $remainingMinutes, // minutes remaining |
|
| 210 | + '/', // path |
|
| 211 | 211 | config('session.domain'), // use session domain config |
| 212 | 212 | config('session.secure'), // use session secure config |
| 213 | - false, // httpOnly |
|
| 214 | - false, // raw |
|
| 213 | + false, // httpOnly |
|
| 214 | + false, // raw |
|
| 215 | 215 | config('session.same_site', 'lax') // use session same_site config |
| 216 | 216 | ); |
| 217 | 217 | |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | try { |
| 36 | 36 | $data = @json_decode($cookie, true); |
| 37 | 37 | |
| 38 | - if (! is_array($data)) { |
|
| 38 | + if (!is_array($data)) { |
|
| 39 | 39 | return false; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | // Validate all required fields |
| 43 | - if (! isset($data['user_id'], $data['token'], $data['expires_at'])) { |
|
| 43 | + if (!isset($data['user_id'], $data['token'], $data['expires_at'])) { |
|
| 44 | 44 | return false; |
| 45 | 45 | } |
| 46 | 46 | |
@@ -63,13 +63,13 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | protected function canPassWithoutCheckingOTP(): bool |
| 65 | 65 | { |
| 66 | - if (! $this->getUser()->passwordSecurity) { |
|
| 66 | + if (!$this->getUser()->passwordSecurity) { |
|
| 67 | 67 | return true; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | return |
| 71 | - ! $this->getUser()->passwordSecurity->google2fa_enable || |
|
| 72 | - ! $this->isEnabled() || |
|
| 71 | + !$this->getUser()->passwordSecurity->google2fa_enable || |
|
| 72 | + !$this->isEnabled() || |
|
| 73 | 73 | $this->noUserIsAuthenticated() || |
| 74 | 74 | $this->twoFactorAuthStillValid() || |
| 75 | 75 | $this->isDeviceTrusted(); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $cookie = request()->cookie('2fa_trusted_device'); |
| 85 | 85 | $user = $this->getUser(); |
| 86 | 86 | |
| 87 | - if (! $cookie) { |
|
| 87 | + if (!$cookie) { |
|
| 88 | 88 | return false; |
| 89 | 89 | } |
| 90 | 90 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | // Validate the required fields silently |
| 99 | - if (! isset($data['user_id'], $data['token'], $data['expires_at'])) { |
|
| 99 | + if (!isset($data['user_id'], $data['token'], $data['expires_at'])) { |
|
| 100 | 100 | return false; |
| 101 | 101 | } |
| 102 | 102 | |