Skip to content

Commit 98bc0a9

Browse files
committed
Fix
1 parent 6e537f4 commit 98bc0a9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

web/pages/_app.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import clsx from 'clsx'
1212
import {initTracking} from 'web/lib/service/analytics'
1313
import WebPush from "web/lib/service/web-push";
1414
import AndroidPush from "web/lib/service/android-push";
15-
import {GoogleAuthProvider, signInWithCredential} from "firebase/auth";
16-
import {auth, GOOGLE_CLIENT_ID} from "web/lib/firebase/users";
15+
import {GOOGLE_CLIENT_ID} from "web/lib/firebase/users";
1716

1817
// See https://nextjs.org/docs/basic-features/font-optimization#google-fonts
1918
// 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>) {
8483

8584
const codeVerifier = localStorage.getItem('pkce_verifier');
8685

87-
const body = new URLSearchParams({
86+
const body = {
8887
client_id: GOOGLE_CLIENT_ID,
8988
code,
9089
code_verifier: codeVerifier!,
9190
redirect_uri: 'com.compassmeet://auth',
9291
grant_type: 'authorization_code',
93-
});
92+
}
9493
console.log('Body:', body);
9594
const tokenResponse = await fetch('https://oauth2.googleapis.com/token', {
9695
method: 'POST',
9796
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
98-
body: body,
97+
body: new URLSearchParams(body),
9998
});
10099

101100
const tokens = await tokenResponse.json();

0 commit comments

Comments
 (0)