This commit is contained in:
MartinBraquet
2025-10-30 17:01:21 +01:00
parent 6e537f4cdf
commit 98bc0a9309

View File

@@ -12,8 +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 {GoogleAuthProvider, signInWithCredential} from "firebase/auth";
import {auth, GOOGLE_CLIENT_ID} from "web/lib/firebase/users";
import {GOOGLE_CLIENT_ID} 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,18 +83,18 @@ function MyApp({Component, pageProps}: AppProps<PageProps>) {
const codeVerifier = localStorage.getItem('pkce_verifier');
const body = new URLSearchParams({
const body = {
client_id: GOOGLE_CLIENT_ID,
code,
code_verifier: codeVerifier!,
redirect_uri: 'com.compassmeet://auth',
grant_type: 'authorization_code',
});
}
console.log('Body:', body);
const tokenResponse = await fetch('https://oauth2.googleapis.com/token', {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: body,
body: new URLSearchParams(body),
});
const tokens = await tokenResponse.json();