Fix google env variables #5

Merged
erman merged 1 commits from supabase into main 2025-06-22 17:59:21 +02:00
Showing only changes of commit 2f41e5ba1a - Show all commits

View File

@@ -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
);
}