From 2854f8870776ab7fb4c6522d755fd6823a7d6bf5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 24 Aug 2025 20:04:13 +0000 Subject: [PATCH 1/2] fix: Handle existing username error on Google callback The google callback page would load indefinitely when a user tried to save a profile with a username that already existed. This was because the frontend was not handling the error response from the backend. This commit fixes the issue by updating the `onResult` and adding an `onError` callback to the `superForm` instance on the google callback page. The `onResult` callback now handles the `failure` case and displays an error message on the username field. The `isSubmitting` state is also reset correctly, preventing the form from hanging. Also, updated the changelog. --- docs/changes.md | 8 ++++++++ .../(auth)/login/google/callback/+page.svelte | 13 ++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/changes.md b/docs/changes.md index 4d5989e..3f8fde8 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -2,6 +2,14 @@ Keep up with the latest updates here :D +## 2025-08-24 + +### Fixed + +- Bug where saving profile on the google callback page loads indefinitely when username exists. + +--- + ## 2025-04-30 ## Fixed diff --git a/src/routes/(auth)/login/google/callback/+page.svelte b/src/routes/(auth)/login/google/callback/+page.svelte index f7c615d..2751edb 100644 --- a/src/routes/(auth)/login/google/callback/+page.svelte +++ b/src/routes/(auth)/login/google/callback/+page.svelte @@ -1,7 +1,7 @@