diff --git a/src/utils/authentication.ts b/src/utils/authentication.ts index d175301..d5ba1d4 100644 --- a/src/utils/authentication.ts +++ b/src/utils/authentication.ts @@ -1,18 +1,15 @@ -import { GoogleAuthProvider } from "firebase/auth"; +import {GoogleAuthProvider, signInWithPopup, User} from "firebase/auth"; import {auth} from "./firebase.ts"; -import { signInWithPopup } from "firebase/auth"; // Initialize a new Google Auth Provider const googleProvider = new GoogleAuthProvider(); // Function to sign in with Google -export const signInWithGoogle = async (): Promise => { +export const signInWithGoogle = async (): Promise => { try { const result = await signInWithPopup(auth, googleProvider); - const user = result.user; - console.log(user); // Return the entire user object - return user; + return result.user; } catch (error) { console.error(error); // Return null if there was an error diff --git a/src/utils/user_prefs.test.ts b/src/utils/user_prefs.test.ts index ebb7bf4..bc8f7f1 100644 --- a/src/utils/user_prefs.test.ts +++ b/src/utils/user_prefs.test.ts @@ -28,9 +28,6 @@ describe("Firestore UserPrefs Tests", () => { // @ts-expect-error const read_prefs = await getUserPrefs(user); - console.log(new_prefs); - console.log(read_prefs); - - expect(_.isEqual(read_prefs, prefs), "UserPref changes to be read").toBeTruthy(); + expect(_.isEqual(read_prefs, new_prefs), "UserPref changes to be read").toBeTruthy(); }); }); \ No newline at end of file