Skip to content

Commit 0c622f5

Browse files
committed
Merge branch 'replace_login_with_fortify' into replace_email_verification_with_fortify
# Conflicts: # app/Providers/FortifyServiceProvider.php
2 parents 074edb7 + 27d83d5 commit 0c622f5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/Providers/FortifyServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ private function configureViews(): void
3737
{
3838
Fortify::loginView(fn (Request $request) => Inertia::render('auth/Login', [
3939
'canResetPassword' => Features::enabled(Features::resetPasswords()),
40-
'canRegister' => Features::enabled(Features::registration()),
4140
'status' => $request->session()->get('status'),
4241
]));
4342

tests/Feature/Auth/TwoFactorChallengeTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use App\Models\User;
66
use Illuminate\Foundation\Testing\RefreshDatabase;
7-
use Inertia\Testing\AssertableInertia;
7+
use Inertia\Testing\AssertableInertia as Assert;
88
use Laravel\Fortify\Features;
99
use Tests\TestCase;
1010

@@ -36,14 +36,20 @@ public function test_two_factor_challenge_can_be_rendered(): void
3636

3737
$user = User::factory()->create();
3838

39+
$user->forceFill([
40+
'two_factor_secret' => encrypt('test-secret'),
41+
'two_factor_recovery_codes' => encrypt(json_encode(['code1', 'code2'])),
42+
'two_factor_confirmed_at' => now(),
43+
])->save();
44+
3945
$this->post(route('login'), [
4046
'email' => $user->email,
4147
'password' => 'password',
4248
]);
4349

4450
$this->get(route('two-factor.login'))
4551
->assertOk()
46-
->assertInertia(fn (AssertableInertia $page) => $page
52+
->assertInertia(fn (Assert $page) => $page
4753
->component('auth/TwoFactorChallenge')
4854
);
4955
}

0 commit comments

Comments
 (0)