Removes Google client secret from codebase

Eliminates storage and usage of the Google OAuth client secret
to enhance security and prevent accidental exposure of sensitive
credentials. Refactors authentication flows to operate without
the embedded secret.
This commit is contained in:
LAPTOP-O016UC3M\Qi Chen committed 2025-12-18 14:17:47 +08:00
1 parent d28f1e13a5
commit 5b4a543fe3
2 files changed
-3

No files matched your search

-1
View File
@@ -379,7 +379,6 @@ export const SYNC_CONSTANTS = {
// OAuth
GITHUB_CLIENT_ID: 'Ov23liuLdkw1H393rtT4', // Public client ID for Device Flow
GOOGLE_CLIENT_ID: '840441747394-n58o8ibgivgd3frqsn0bo5revf4viq2a.apps.googleusercontent.com',
GOOGLE_CLIENT_SECRET: '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', // TODO: Replace with your Desktop app client secret
ONEDRIVE_CLIENT_ID: 'your-onedrive-client-id',
// API endpoints
@@ -136,7 +136,6 @@ export const exchangeCodeForTokens = async (
return await exchangeViaMain({
clientId: SYNC_CONSTANTS.GOOGLE_CLIENT_ID,
clientSecret: SYNC_CONSTANTS.GOOGLE_CLIENT_SECRET,
code,
codeVerifier,
redirectUri,
@@ -157,7 +156,6 @@ export const refreshAccessToken = async (refreshToken: string): Promise<OAuthTok
return await refreshViaMain({
clientId: SYNC_CONSTANTS.GOOGLE_CLIENT_ID,
clientSecret: SYNC_CONSTANTS.GOOGLE_CLIENT_SECRET,
refreshToken,
});
};