diff --git a/app/Http/Controllers/Auth/SsoLoginController.php b/app/Http/Controllers/Auth/SsoLoginController.php index d4c391e..3a95133 100644 --- a/app/Http/Controllers/Auth/SsoLoginController.php +++ b/app/Http/Controllers/Auth/SsoLoginController.php @@ -150,7 +150,7 @@ class SsoLoginController extends Controller // Per-app sign-out: end only this app's session and keep the platform // (auth.ladill.com) SSO session alive so "Sign in again" re-auths silently // without a password. Full "sign out of all Ladill apps" lives on account. - return redirect()->away($this->defaultSignedOutUrl()); + return redirect()->route('woo.signed-out'); } /** Platform session ended — clear this app and offer silent sign-in again. */ diff --git a/config/signed_out.php b/config/signed_out.php index 1e1413e..6c68018 100644 --- a/config/signed_out.php +++ b/config/signed_out.php @@ -3,5 +3,5 @@ return [ 'title' => 'Ladill Woo Manager', 'logo' => 'images/logo/ladillwoomanager-logo.svg', - 'description' => 'Your Ladill Woo Manager session has ended. Sign in again to manage invoices.', + 'description' => 'Your Ladill Woo Manager session has ended. Sign in again to manage orders, products, and stores.', ]; diff --git a/resources/views/auth/signed-out.blade.php b/resources/views/auth/signed-out.blade.php index c6306cc..824ff4f 100644 --- a/resources/views/auth/signed-out.blade.php +++ b/resources/views/auth/signed-out.blade.php @@ -1,6 +1,6 @@ @php $signedOut = (array) config('signed_out'); - $logo = (string) ($signedOut['logo'] ?? 'images/logo/ladillgive-logo.svg'); + $logo = (string) ($signedOut['logo'] ?? 'images/logo/ladillwoomanager-logo.svg'); $logoPath = public_path($logo); @endphp diff --git a/resources/views/woo/signed-out.blade.php b/resources/views/woo/signed-out.blade.php index 7271556..10d87e7 100644 --- a/resources/views/woo/signed-out.blade.php +++ b/resources/views/woo/signed-out.blade.php @@ -1,17 +1 @@ - - - - - - Signed out — Ladill Woo Manager - @include('partials.favicon') - @vite(['resources/css/app.css']) - - -
-

Signed out

-

You have been signed out of Ladill Woo Manager.

- Sign in again -
- - +@include('auth.signed-out') diff --git a/tests/Feature/WooSignedOutTest.php b/tests/Feature/WooSignedOutTest.php new file mode 100644 index 0000000..e8789b3 --- /dev/null +++ b/tests/Feature/WooSignedOutTest.php @@ -0,0 +1,41 @@ +get(route('woo.signed-out')) + ->assertOk() + ->assertSee('You’re signed out', false) + ->assertSee('Ladill Woo Manager', false) + ->assertSee('manage orders, products, and stores', false) + ->assertSee(route('sso.connect'), false) + ->assertSee('Go to ladill.com', false); + } + + public function test_authenticated_user_is_redirected_from_signed_out_page(): void + { + $this->actingAs(User::factory()->create()) + ->get(route('woo.signed-out')) + ->assertRedirect(route('woo.dashboard')); + } + + public function test_logout_redirects_to_signed_out_page(): void + { + $user = User::factory()->create(); + + $this->actingAs($user) + ->post(route('logout')) + ->assertRedirect(route('woo.signed-out')); + + $this->assertGuest(); + } +}