diff --git a/web/lib/firebase/users.ts b/web/lib/firebase/users.ts index 5a5c52f6..53f8044d 100644 --- a/web/lib/firebase/users.ts +++ b/web/lib/firebase/users.ts @@ -68,7 +68,8 @@ async function generatePKCE() { return {codeVerifier, codeChallenge}; } -export const GOOGLE_CLIENT_ID = '253367029065-khkj31qt22l0vc3v754h09vhpg6t33ad.apps.googleusercontent.com' +// export const WEB_GOOGLE_CLIENT_ID = '253367029065-khkj31qt22l0vc3v754h09vhpg6t33ad.apps.googleusercontent.com' +export const ANDROID_GOOGLE_CLIENT_ID = '253367029065-s9sr5vqgkhc8f7p5s6ti6a4chqsrqgc4.apps.googleusercontent.com' /** * Authenticates a Firebase client running a webview APK on Android with Google OAuth. @@ -85,7 +86,7 @@ export async function webviewGoogleSignin() { localStorage.setItem('pkce_verifier', codeVerifier); const params = new URLSearchParams({ - client_id: GOOGLE_CLIENT_ID, + client_id: ANDROID_GOOGLE_CLIENT_ID, redirect_uri: 'com.compassmeet:/auth', // your deep link response_type: 'code', scope: 'openid email profile', diff --git a/web/pages/_app.tsx b/web/pages/_app.tsx index 578c36b4..f576d2eb 100644 --- a/web/pages/_app.tsx +++ b/web/pages/_app.tsx @@ -12,7 +12,7 @@ import clsx from 'clsx' import {initTracking} from 'web/lib/service/analytics' import WebPush from "web/lib/service/web-push"; import AndroidPush from "web/lib/service/android-push"; -import {GOOGLE_CLIENT_ID, isAndroidWebView} from "web/lib/firebase/users"; +import {ANDROID_GOOGLE_CLIENT_ID, isAndroidWebView} from "web/lib/firebase/users"; // See https://nextjs.org/docs/basic-features/font-optimization#google-fonts // and if you add a font, you must add it to tailwind config as well for it to work. @@ -84,7 +84,7 @@ function MyApp({Component, pageProps}: AppProps) { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ - client_id: GOOGLE_CLIENT_ID, + client_id: ANDROID_GOOGLE_CLIENT_ID, code, code_verifier: codeVerifier!, redirect_uri: 'com.compassmeet:/auth',