File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export async function webviewGoogleSignin() {
8888
8989 const params = new URLSearchParams ( {
9090 client_id : GOOGLE_CLIENT_ID ,
91- redirect_uri : 'com .compassmeet: /auth' , // your deep link
91+ redirect_uri : 'https://www .compassmeet.com /auth/callback' ,
9292 response_type : 'code' ,
9393 scope : 'openid email profile' ,
9494 code_challenge : codeChallenge ,
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < title > Redirecting...</ title >
6+ < script >
7+ ( function ( ) {
8+ // Extract query string (includes ?code=...&state=...)
9+ const params = new URLSearchParams ( window . location . search ) ;
10+ const code = params . get ( 'code' ) ;
11+ const state = params . get ( 'state' ) ;
12+ console . log ( '/auth/callback code' , code ) ;
13+
14+ if ( code ) {
15+ // Send code back to native app
16+ const deepLink = `com.compassmeet://auth?code=${ encodeURIComponent ( code ) } &state=${ encodeURIComponent ( state || '' ) } ` ;
17+ window . location . href = deepLink ;
18+ } else {
19+ document . body . textContent = 'Missing code in redirect.' ;
20+ }
21+ } ) ( ) ;
22+ </ script >
23+ </ head >
24+ < body >
25+ Redirecting to app...
26+ </ body >
27+ </ html >
You can’t perform that action at this time.
0 commit comments