From 2f41e5ba1a3a10735767e14c8329c88fd9be21b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Kr=C4=8Dek?= Date: Sun, 22 Jun 2025 17:58:54 +0200 Subject: [PATCH] Fix google env variables --- src/lib/google.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/lib/google.ts b/src/lib/google.ts index 8048080..905f680 100644 --- a/src/lib/google.ts +++ b/src/lib/google.ts @@ -1,21 +1,13 @@ import { google } from 'googleapis'; import { env } from '$env/dynamic/private'; -const { - GOOGLE_CLIENT_ID, - GOOGLE_CLIENT_SECRET -} = env; - -/* NEW REDIRECT — must match Google Cloud OAuth settings */ -const REDIRECT_URI = 'http://localhost:5173/private/api/gmail'; - export const scopes = ['https://www.googleapis.com/auth/gmail.send']; export function getOAuthClient() { return new google.auth.OAuth2( - GOOGLE_CLIENT_ID, - GOOGLE_CLIENT_SECRET, - REDIRECT_URI + env.GOOGLE_CLIENT_ID, + env.GOOGLE_CLIENT_SECRET, + env.GOOGLE_REDIRECT_URI ); } -- 2.49.1