mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-04 23:03:45 -04:00
Add bridge
This commit is contained in:
@@ -88,7 +88,7 @@ export async function webviewGoogleSignin() {
|
||||
|
||||
const params = new URLSearchParams({
|
||||
client_id: GOOGLE_CLIENT_ID,
|
||||
redirect_uri: 'com.compassmeet:/auth', // your deep link
|
||||
redirect_uri: 'https://www.compassmeet.com/auth/callback',
|
||||
response_type: 'code',
|
||||
scope: 'openid email profile',
|
||||
code_challenge: codeChallenge,
|
||||
|
||||
27
web/pages/auth/callback.html
Normal file
27
web/pages/auth/callback.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Redirecting...</title>
|
||||
<script>
|
||||
(function() {
|
||||
// Extract query string (includes ?code=...&state=...)
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const code = params.get('code');
|
||||
const state = params.get('state');
|
||||
console.log('/auth/callback code', code);
|
||||
|
||||
if (code) {
|
||||
// Send code back to native app
|
||||
const deepLink = `com.compassmeet://auth?code=${encodeURIComponent(code)}&state=${encodeURIComponent(state || '')}`;
|
||||
window.location.href = deepLink;
|
||||
} else {
|
||||
document.body.textContent = 'Missing code in redirect.';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
Redirecting to app...
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user