TwentyT
Twenty2y ago
18 replies
Cosmos

Error 500 when connecting Gmail

Hi there. I'm getting an issue connecting my gmail. I'm wondering whether this is an .env problem, docker-compose problem, an API library problem, or bug in the application?

I'm getting through to the google screens, but when I land back on the app I get an error 500.

This is the URL in my browser: http://localhost:3000/auth/google-apis/get-access-token?state=%7B%22transientToken%22:%22eyJredacted.eyJzdWIiOiIzOWMyredactedloM%22%7D&code=4/0redactedw&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20https://www.googleapis.com/auth/gmail.readonly%20openid&authuser=0&hd=redacted.com&prompt=consent


Using docker-compose up -d


my .env file:
TAG=v0.20.0

PG_DATABASE_HOST=db:5432

SERVER_URL=http://localhost:3000
# Uncoment if you are serving your front on another server than the API (eg. bucket)
# FRONT_BASE_URL=http://localhost:3000



SIGN_IN_PREFILLED=false

STORAGE_TYPE=local

# STORAGE_S3_REGION=eu-west3
# STORAGE_S3_NAME=my-bucket
# STORAGE_S3_ENDPOINT=

MESSAGE_QUEUE_TYPE=pg-boss
# === Randomly generated secrets ===
# Use openssl rand -base64 32 for each secret
ACCESS_TOKEN_SECRET=Zz..T1g=
LOGIN_TOKEN_SECRET=O..4=
REFRESH_TOKEN_SECRET=FV..w4=
FILE_TOKEN_SECRET=S..U=

POSTGRES_ADMIN_PASSWORD=Br..I=



FRONT_AUTH_CALLBACK_URL=${SERVER_URL}/verify

AUTH_PASSWORD_ENABLED=true
AUTH_GOOGLE_ENABLED=true
AUTH_GOOGLE_CLIENT_ID=5redacted.apps.googleusercontent.com
AUTH_GOOGLE_CLIENT_SECRET=GedactedG

AUTH_GOOGLE_CALLBACK_URL=${SERVER_URL}/auth/google/redirect
AUTH_GOOGLE_APIS_CALLBACK_URL=${SERVER_URL}/auth/google-apis/get-access-token

CALENDAR_PROVIDER_GOOGLE_ENABLED=true
MESSAGING_PROVIDER_GMAIL_ENABLED=true


EMAIL_SMTP_HOST=smtp.gmail.com
EMAIL_SMTP_PORT=465
[email protected]
EMAIL_SMTP_PASSWORD='re da ct ed'
Screenshot_2024-07-06_at_11.28.20.png
Was this page helpful?