13 days ago
I deployed Supabase to a new project using the URL: Deploy Supabase | Railway
The project is running, and I can access the Supabase dashboard after logging in. However, when I open the Auth tab, I don’t see any options for enabling social sign-in. I’ve attached an image for reference.
Could you help me understand what I might be missing?
Attachments
11 Replies
13 days ago
i think this is normal — the Supabase Studio UI does NOT show social login options when self-hosting including the official Railway template. social providers must be enabled manually via GoTrue environment variables
To fix it:
Go to your Gotrue (Auth) service on Railway → Variables.
Add for each provider (example: Google):
GOTRUE_EXTERNAL_GOOGLE_ENABLED=true GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=xxx GOTRUE_EXTERNAL_GOOGLE_SECRET=xxx GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=https://<your-domain>/auth/v1/callbackSet:
GOTRUE_SITE_URL=https://<your-domain>Restart the Gotrue service.
In your third-party social providers (idk google or github .. ) console, set the same redirect URL:
https://<your-domain>/auth/v1/callback
after that, social login works even though the Studio UI doesn’t show switches for providers.
12 days ago
Thank you so much, I will try that. Will it also support sending confirmation or verification emails for user?
12 days ago
yes,, it supports confirmation and verification emails , you just need to configure SMTP.
the two important GoTrue settings for email behavior are:
GOTRUE_MAILER_AUTOCONFIRM=false # requir users to confirm email
GOTRUE_MAILER_URLPATHS_CONFIRMATION=/auth/v1/verify
and you must also add your SMTP server settings:
GOTRUE_SMTP_HOST=<your-smtp-host>
GOTRUE_SMTP_PORT=<port>
GOTRUE_SMTP_USER=<username>
GOTRUE_SMTP_PASS=<password>
GOTRUE_SMTP_ADMIN_EMAIL=<from-email>
after saving them and restarting the Gotrue service,
email confirmation +, email verification + password reset emails all work normally in Railway.
12 days ago
I see,
I made those changes, and I am trying to send an invitation email to my email id.
In the logs of the railway for the auth service, i see this below
```
Request received external host in X-Forwarded-Host or Host headers, but the values have not been added to GOTRUE_MAILER_EXTERNAL_HOSTS and will not be used. To suppress this message add the host, or sanitize the headers before the request reaches Auth.
```
And then the next log says
```
504: Processing this request timed out, please retry after a moment.
```
Can you please let me know if you know anything around this?
12 days ago
that message means GoTrue is rejecting the domain that’s hitting the Auth service.
you need to add your public Railway domain to this variable in the Gotrue/Auth service:
GOTRUE_MAILER_EXTERNAL_HOSTS=<your-domain>
ex:
GOTRUE_MAILER_EXTERNAL_HOSTS=myproject.up.railway.app
after adding it, restart the Gotrue service.
this removes the warning and also fixes the 504 timeout, GoTrue times out when the mailer host isn't trusted.
make sure you also have:
GOTRUE_SITE_URL=https://<your-domain>
12 days ago
lmk what happens
12 days ago
Still no luck invite API is throwing timeout error. Are you sure the variables are
GOTRUE_SMTP_HOST=<your-smtp-host>
GOTRUE_SMTP_PORT=<port>
GOTRUE_SMTP_USER=<username>
GOTRUE_SMTP_PASS=<password>
GOTRUE_SMTP_ADMIN_EMAIL=<from-email>
The reason I'm asking is that I deployed Supabase in my local Windows using docker, there i used below varibles (Without GOTRUE_)
SMTP_ADMIN_EMAIL=
SMTP_HOST=
SMTP_PORT=
SMTP_PASS=
SMTP_SENDER_NAME=
It is working fine there, and now when i tried these variables, the email is sent from supabase, but i didnt get any in my inbox
12 days ago
you're right to question the variable names.
in Railway's Supabase template, the GoTrue service sometimes expects variables without the GOTRUE_ prefix for SMTP settings.
try changing your SMTP variables to:
SMTP_HOST=<your-smtp-host>
SMTP_PORT=<port>
SMTP_USER=<username>
SMTP_PASS=<password>
SMTP_ADMIN_EMAIL=<from-email>
SMTP_SENDER_NAME=<optional-name>but keep the GOTRUE_ prefix for these:
GOTRUE_MAILER_AUTOCONFIRM=false
GOTRUE_MAILER_EXTERNAL_HOSTS=<your-railway-domain>
GOTRUE_SITE_URL=https://<your-railway-domain>after updating, restart the Gotrue/Auth service again.
also double-check:
your SMTP credentials are correct (test them with your local setup if needed)
the SMTP port matches your provider (usually 587 for TLS or 465 for SSL)
check if your SMTP provider requires any IP whitelisting
let me know if emails start going through after this change!
12 days ago
Still no luck,
Just read that "Railway permits direct SMTP on the Pro plan or higher. OP has solved their issue as well." I have hobby plan. Does it mean that i wont be able to use supabase auth email?
12 days ago
yeah honestly if this is going to production, Pro plan is probably your best bet - no more dealing with these SMTP headaches
Status changed to Solved brody • 12 days ago
