From a361454843814030724dda8cf34f09590f8b1813 Mon Sep 17 00:00:00 2001 From: Jan Paepke Date: Tue, 11 Feb 2025 15:41:41 +0100 Subject: [PATCH] fix bug in auth Without await, this will never actually catch the error in the try/catch block, but return the (rejected) promise. --- nextjs-end/src/lib/firebase/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextjs-end/src/lib/firebase/auth.js b/nextjs-end/src/lib/firebase/auth.js index 362984b30..ae72946b3 100644 --- a/nextjs-end/src/lib/firebase/auth.js +++ b/nextjs-end/src/lib/firebase/auth.js @@ -22,7 +22,7 @@ export async function signInWithGoogle() { export async function signOut() { try { - return auth.signOut(); + await auth.signOut(); } catch (error) { console.error("Error signing out with Google", error); }