From ebd80524acbd4c97e21393f5ce89165eb5b4fe98 Mon Sep 17 00:00:00 2001 From: Blake Mason Date: Thu, 7 Mar 2024 12:54:26 -0800 Subject: [PATCH] [B] Removes auth logs and renames auth endpoint --- components/atomic/Button/patterns/GoogleSSOButton.js | 2 +- pages/api/{authGoogle.js => charming-overlords.js} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename pages/api/{authGoogle.js => charming-overlords.js} (90%) diff --git a/components/atomic/Button/patterns/GoogleSSOButton.js b/components/atomic/Button/patterns/GoogleSSOButton.js index 2cf2df02..2737cf7c 100644 --- a/components/atomic/Button/patterns/GoogleSSOButton.js +++ b/components/atomic/Button/patterns/GoogleSSOButton.js @@ -17,7 +17,7 @@ export default function GoogleSSOButton({ children, ...buttonProps }) { shallow: true, } ); - fetch("/api/authGoogle", { + fetch("/api/charming-overlords", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ code: response.code }), diff --git a/pages/api/authGoogle.js b/pages/api/charming-overlords.js similarity index 90% rename from pages/api/authGoogle.js rename to pages/api/charming-overlords.js index a5e568d3..929dfa09 100644 --- a/pages/api/authGoogle.js +++ b/pages/api/charming-overlords.js @@ -13,14 +13,14 @@ const oAuth2Client = new OAuth2Client( async function getTokens(code) { const { tokens } = await oAuth2Client.getToken(code); // eslint-disable-next-line no-console - console.log("TOKENS:", tokens); + // console.log("TOKENS:", tokens); return tokens; } export default async function handler(req, res) { try { // eslint-disable-next-line no-console - console.log("CODE:", req.body.code); + // console.log("CODE:", req.body.code); const { id_token: idToken } = await getTokens(req.body.code); res.status(200).json({ idToken }); } catch (err) {