@@ -12,8 +12,7 @@ import clsx from 'clsx'
1212import { initTracking } from 'web/lib/service/analytics'
1313import WebPush from "web/lib/service/web-push" ;
1414import 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