Skip to content

Commit

Permalink
[B] Removes auth logs and renames auth endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake Mason authored and blnkt committed Mar 7, 2024
1 parent bdc3c77 commit ebd8052
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/atomic/Button/patterns/GoogleSSOButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down
4 changes: 2 additions & 2 deletions pages/api/authGoogle.js → pages/api/charming-overlords.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ebd8052

Please sign in to comment.