You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Discussion] Google OAuth Redirection Issue in Self-Hosted Teable Community
#1957
Hello @Sebastien73,
Thank you for your detailed question about Google OAuth configuration in self-hosted Teable Community. Let me address your questions:
Automatic redirect to Google OAuth
Yes, this is normal behavior. The reason you're being automatically redirected to Google OAuth without seeing a "Sign in with Google" button is because:
You have disabled username/password authentication in your Teable configuration
Google OAuth is the only available authentication method configured
When only one authentication provider is available, Teable automatically redirects users to that provider to streamline the login process
The "Access blocked: Authorization Error" issue
This error occurs because your Google OAuth application configuration needs to be properly set up. You need to check and configure in your Google Cloud Console: "Authorized JavaScript origins" and "Authorized redirect URIs"
About the redirect_uri parameter
The redirect_uri=/space parameter you see is Teable's internal redirect parameter that tells the application where to redirect the user after successful authentication. Here are the key points:
This redirect destination is currently not configurable in Teable's settings
The redirect destination is determined by the "redirect" query parameter from the login page
Default behavior: If no redirect parameter is specified, users are redirected to / (root path) after authentication.
Hello @Sebastien73, Thank you for your detailed question about Google OAuth configuration in self-hosted Teable Community. Let me address your questions:
1. Automatic redirect to Google OAuth
Yes, this is normal behavior. The reason you're being automatically redirected to Google OAuth without seeing a "Sign in with Google" button is because:
You have disabled username/password authentication in your Teable configuration
Google OAuth is the only available authentication method configured
When only one authentication provider is available, Teable automatically redirects users to that provider to streamline the login process
2. The "Access blocked: Authorization Error" issue
This error occurs because your Google OAuth application configuration needs to be properly set up. You need to check and configure in your Google Cloud Console: "Authorized JavaScript origins" and "Authorized redirect URIs"
3. About the redirect_uri parameter
The redirect_uri=/space parameter you see is Teable's internal redirect parameter that tells the application where to redirect the user after successful authentication. Here are the key points:
This redirect destination is currently not configurable in Teable's settings
The redirect destination is determined by the "redirect" query parameter from the login page
Default behavior: If no redirect parameter is specified, users are redirected to / (root path) after authentication.
I realized I had not set the Authorized JavaScript origins in my Google Cloud app. I added it now (https://teable.octoop.com), but unfortunately, it still doesn’t work. I’m still getting the same error:
Access blocked: Authorization Error Missing required parameter: redirect_uri Error 400: invalid_request
I will attach some screenshots to illustrate the configuration and the error.
My Google app configuration :
When I try to go on https://teable.octoop.com :
We also understand that using the username/password login is not possible. I’m asking because if I set the environment variable PASSWORD_LOGIN_DISABLED to false, my Teable pod fails to start, and the logs clearly show:
The environment variable "PASSWORD_LOGIN_DISABLED" must be set to [true]
Any ideas on how to handle this in a self-hosted setup given my current configuration, or did I miss something?
Thank you for the additional details and screenshots. I can see two issues here:
PASSWORD_LOGIN_DISABLED Environment Variable
Remove the environment variable entirely (don't set it at all) 😅
Google OAuth Configuration Issue
Your Google Cloud Console configuration looks perfectly correct from the screenshots. I can't spot any obvious issues with your setup either.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I’m testing Teable in self-hosted mode with the teable-community image and I have some questions about how Google OAuth works.
Here’s my setup:
Teable backend accessible at https://teable.octoop.com
Teable pod + Redis running correctly
Google OAuth configured with:
Authorized Redirect URI: https://teable.octoop.com/api/auth/google/callback
Client ID and Client Secret passed as environment variables
What happens:
I go to https://teable.octoop.com/
No Teable frontend appears, I’m directly redirected to Google OAuth (endpoint /api/auth/google) with a query param redirect_uri=/space
After authenticating on Google, I return to /api/auth/google/callback
Then Teable tries to redirect to /space
Google blocks the redirection with “Access blocked: Authorization Error” every time
My questions:
Is it normal that the frontend shows no “Sign in with Google” button and automatically redirects to Google?
Is the redirect_uri parameter used by Teable (/space) fixed, or can it be modified to point to a full external URL?
Should anything be configured on the Google side so that /space is accepted, or is this entirely handled by the Teable server?
Is there a recommended way to use Teable Community with Google OAuth in self-hosted mode without Google blocking the redirection?
Thanks in advance for any guidance—I want to make sure I haven’t missed any configuration steps before digging further.
All reactions