We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c1c94d commit ccde6e4Copy full SHA for ccde6e4
web/pages/auth/callback.html
web/pages/auth/callback.tsx
@@ -0,0 +1,18 @@
1
+import {useEffect} from "react";
2
+
3
+export default function GoogleAuthCallback() {
4
+ useEffect(() => {
5
+ const params = new URLSearchParams(window.location.search);
6
+ const code = params.get('code');
7
+ const state = params.get('state');
8
+ console.log('/auth/callback code', code);
9
10
+ if (code) {
11
+ // Send code back to native app
12
+ const deepLink = `com.compassmeet://auth?code=${encodeURIComponent(code)}&state=${encodeURIComponent(state || '')}`;
13
+ window.location.href = deepLink;
14
+ } else {
15
+ document.body.textContent = 'Missing code in redirect.';
16
+ }
17
+ }, []);
18
+}
0 commit comments