Guide for implementing google SSO w/ Twenty
Hey All,
Looking at the docs it appears the
auth_google_*
environment variables are for implementing google SSO. Has anyone found success with this using google workspace. In searching the github, docs, discord, etc... I cannot seem to find any documentation on this.
Thanks in advance14 Replies
Hi @John, not sure what your question is 🙂 Twenty does support Google SSO 🙂
Understood, thanks for the reply — question came from the env var page (found here: https://twenty.com/developers/section/self-hosting/self-hosting-var) which to me reads as if it supports SSO login for users.
![No description](https://cdn.answeroverflow.com/1251013575669973083/Screenshot_2024-06-13_at_8.18.20_PM.png)
I got it to work in the end by reading the messages in "Setting Up Gmail/Google Auth in Self Hosted Twenty (Docker Compose)" thread. There are one or two extra environmental variables, and it's also worth noting that gcloud can take some time to update the redirect URLs. I'm not sure if there is any actual documentation for what the redirect URLs are, or how I was supposed to know them without seeing that thread though.
Although, I can log in, connecting email account doesn't work, I get a 404 on the redirect, so maybe I spoke too soon
When I try to connect the gmail/calendar accounts I get a 404, when it tries to direct back to this URL:
@jellifish we are doing a pretty bad job at documenting environment variable and setup. There is an ongoing effort to simplify it!
It should be: AUTH_GOOGLE_APIS_CALLBACK_URL=http://localhost:3000/auth/google-apis/get-access-token
try removing the /google/ from your url
Thanks, I have it working now đź‘Ť
wonderful!
Although...the email sync just continunes saying "ongoing..." - should that end at some point?
do you have your worker running? what do you see in the logs? what's the status of your messageChannel in db ?
The worker is running, and the logs don't show any error, just this:-
But when I look at people and the emails tab, nothing is shown, and the "ongoing..." is still happening in the email settings.
I guess I need to figure out how to import from the cache?
what MESSAGE_QUEUE_TYPE do you have?
I’m not sure I have defined it or changed it from whatever the default is…what should it be? This is a docker installation.
can you connect to your container (ssh) and do: "env"
and paste the result here (without any secret of course)
OK this is in the server container (not the worker container) so pg-boss seems to be the queue type:-
Appreciate the help so far, so is there something I need to "kick" to get the cache imported?
I fired up a redis container and used that instead. It seems to work better. Maybe that should be the default way to do it in the example docker-compose.yml file?
great!
pg-boss should be working too and that's what I'm using locally. pg-boss is great because it does not require any extra knowledge on how to setup a redis, so we will keep it as the out-of-the box setting. But we recommend using redis for production environment
(it's what we have for Twenty cloud)