This commit is contained in:
Benjamin Toby
2025-02-19 08:39:03 +01:00
parent 8b3553fcd5
commit 2e0b6d0a70
26 changed files with 387 additions and 14 deletions
@@ -26,9 +26,7 @@ export default async function googleLogin({
serverRes,
loginFailureReason,
}: Param) {
const client = new OAuth2Client(
process.env.NEXT_PUBLIC_DSQL_GOOGLE_CLIENT_ID
);
const client = new OAuth2Client(process.env.DSQL_GOOGLE_CLIENT_ID);
let isGoogleAuthValid = false;
let newFoundUser = null;
@@ -39,7 +37,7 @@ export default async function googleLogin({
try {
const ticket = await client.verifyIdToken({
idToken: reqBody.token,
audience: process.env.NEXT_PUBLIC_DSQL_GOOGLE_CLIENT_ID, // Specify the CLIENT_ID of the app that accesses the backend
audience: process.env.DSQL_GOOGLE_CLIENT_ID, // Specify the CLIENT_ID of the app that accesses the backend
// Or, if multiple clients access the backend:
//[CLIENT_ID_1, CLIENT_ID_2, CLIENT_ID_3]
});