Description
Describe the current behavior
After setting all the 4 environment variables (https://github.com/gristlabs/grist-core?tab=readme-ov-file#google-drive-integrations) in my docker-compose, the "Export to Google Drive" fails every time.
The issue, as i understand, is the incorrect Redirect URI being sent by Grist to Google, in the OAuth process.
Example, in my case:
the redirect_uri=https://docs.my-grist-domain's-host/auth/google,
even though, my Grist instance is actually at: https://abc.my-grist-domain's-host!
Why is this so? And how to rectify it?
Steps to reproduce
^
Describe the expected behavior
Should redirect to the correct URI on my actual Grist instance.
Where have you encountered this bug?
- On docs.getgrist.com
- On a self-hosted instance
Instance information (when self-hosting only)
-
Grist instance:
- Version: 1.5.0
- URL (if it's OK for you to share it):
- Installation mode: docker
- Architecture: single-worker
-
Browser name, version and platforms on which you could reproduce the bug: Chrome, Version 134.0.6998.178 (Official Build) (64-bit)
-
Link to browser console log if relevant:
ERROR: Error: auth_interrupted
at googleAuth.ts:66:16
at googleAuth.ts:105:5
T @ errors.ts:122
(anonymous) @ sendToDrive.ts:37
await in (anonymous)
(anonymous) @ ShareMenu.ts:300
(anonymous) @ menu.ts:114
handleEvent @ domevent.ts:70Understand this errorAI
- Link to server log if relevant:
2025-04-04 11:58:04.002 - debug: GoogleAuth - redirecting to Google consent screen {
authUrl: 'https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.file&prompt=select_account&state=https%3A%2F%2Fmy-grist-instance-domain&response_type=code&client_id=1011360016277-e761c7mq73dusnk3omois94qm7kms6l7.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fdocs.my-grist-instance's-root-domain%2Fauth%2Fgoogle',
scope: 'https://www.googleapis.com/auth/drive.file',
state: 'https://my-grist-instance-domain'
}
2025-04-04 11:58:21.714 - warn: client error stack=Error: auth_interrupted
at https://my-grist-instance-domain/v/unknown/main.bundle.js:2:589495
at https://my-grist-instance-domain/v/unknown/main.bundle.js:2:589276, message=auth_interrupted, docId=in4kQDbc5VwQoohgNhdG6A, page=https://my-grist-instance-domain/o/lepl/in4kQDbc5VwQ/Untitled-document, language=en-GB, platform=Win32, userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36, org=lepl, email=my-login-email, userId=5, altSessionId=b5dK3yN3BDa98kUFkUPpzJ