Supabase Template GoTrue

tacg78952
PRO

22 days ago

Hi everyone, I did the deploy of the Supabase template and almost everything works fine to me, I'm just having some problems with the GoTrue service.

My problem: When using the supabase Auth to validate the emails of my users the link generated to validate it is a kong/verify?token= and seems like this route doesn't exist at the kong service.

Can anyone help me how can I correct that?

Sorry but I´m new at this world.

I'll appreciate any help, see ya

$10 Bounty

5 Replies

tacg78952
PRO

22 days ago

ac9f833d-c373-4cda-801d-5ddf0ac2c88d


turborx
FREETop 10% Contributor

22 days ago

hi, you need to set SUPABASE_JWT_SECRET, SUPABASE_ANON_KEY, and SUPABASE_SERVICE_KEY in your studio service env vars. generate these keys using supabase’s jwt tool or self-hosting docs, add them to railway, then redeploy the service to fix the 502.


sanyasharma7
FREE

22 days ago

Hey! This usually happens when the SITE_URL or AUTH_REDIRECT_URLS in your Supabase project settings isn’t set correctly.

Try this

  1. Go to your Supabase project → Authentication → URL Configuration

  2. Set these:

    • Site URL:
      https://<your-app-domain> (e.g. https://myapp.up.railway.app)

  3. If using Railway + Supabase self-hosted, and the URL contains kong/verify, it means Kong is trying to route internally — but you need to expose /verify via your frontend or manually redirect to it.


turborx

hi, you need to set SUPABASE_JWT_SECRET, SUPABASE_ANON_KEY, and SUPABASE_SERVICE_KEY in your studio service env vars. generate these keys using supabase’s jwt tool or self-hosting docs, add them to railway, then redeploy the service to fix the 502.

tacg78952
PRO

21 days ago

I've it correctly seted, I double check it. I've the SUPABASE_JWT_SECRET, SUPABASE_ANON_KEY and SUPABASE_SERVICE_KEY defined at Supabase Studio service. I can fetch from my website, so I think the keys are working fine. I can also register a new user, only the confirmation link do not work and route trough the kong and not trough my domain. Any other idea brother?


sanyasharma7

Hey! This usually happens when the SITE_URL or AUTH_REDIRECT_URLS in your Supabase project settings isn’t set correctly.Try thisGo to your Supabase project → Authentication → URL ConfigurationSet these:Site URL:https://<your-app-domain> (e.g. https://myapp.up.railway.app)If using Railway + Supabase self-hosted, and the URL contains kong/verify, it means Kong is trying to route internally — but you need to expose /verify via your frontend or manually redirect to it.

tacg78952
PRO

21 days ago

My version is self hosted. Indeed I didn't had the AUTH_REDIRECT_URLS seted in my GoTrue service, I did it and put my domain on it. But this doesn't correct it. My emails continue to send the kong/verify=token link something like this https://kong-production.up.railway.app/verify?token=b04162b295eb88ebbfe3247&type=signup&redirect_to=https://my-domain.com.

One question: SITE_URL and AUTH_REDIRECT_URLS needs to be my public domain of my app right? Or I'm mistaken it with the URL of supabase instance?

In the self hosted layout the kong public URL redirect to the Supabase studio interface, and I cant acess the Kong interface to reroute the /verify. I don't know if I have other option, can you tell me if there's another thing I can do?

Regards


13 days ago

Here is the solution:

The issue is your Site URL is not configured. GoTrue is using the internal Kong URL by default.

To fix it:

  1. Go to your Supabase Project > Authentication > URL Configuration.

  2. Set the Site URL to your public frontend application's domain (e.g., https://your-app.com).

  3. Add that same public domain to the Redirect URLs list below.

The Site URL must be your app's public address, not the Supabase instance URL. After saving, new verification links will be correct.

Attachments