From c70ce4c30bfecf1e5b452158ac2391cdeb87f2c2 Mon Sep 17 00:00:00 2001 From: Tajim Date: Thu, 24 Sep 2026 21:24:23 +0600 Subject: [PATCH] fix: update google callback failure message --- app/Http/Controllers/AuthController.php | 2 +- tests/Feature/AuthenticationTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 7f76a400..81514adb 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -59,7 +59,7 @@ public function handleGoogleCallback(Request $request) } catch (\Throwable $e) { report($e); - return redirect()->route('login')->with('error', 'Failed to authenticate with Google. Please try again.'); + return redirect()->route('login')->with('error', 'Failed to authenticate. Refresh the page & try again.'); } $user = User::where('google_id', $googleUser->getId()) diff --git a/tests/Feature/AuthenticationTest.php b/tests/Feature/AuthenticationTest.php index c7272fa6..e095ad61 100644 --- a/tests/Feature/AuthenticationTest.php +++ b/tests/Feature/AuthenticationTest.php @@ -364,7 +364,7 @@ $response = $this->get(route('auth.google.callback')); $response->assertRedirect(route('login')); - $response->assertSessionHas('error', 'Failed to authenticate with Google. Please try again.'); + $response->assertSessionHas('error', 'Failed to authenticate. Refresh the page & try again.'); }); test('google auth redirects to intended url if set for existing user', function () {