Replies: 4 comments 3 replies
|
Hello, yeah, this one trips people up 👍 This is actually expected behavior (even though the docs make it sound like everything switches over to the custom domain). The even when you enable a custom domain. Why it works this wayThe custom domain is mainly for:
But the JWT issuer (
If they changed the issuer dynamically, it would cause issues for any system already validating tokens against the original issuer. What you should doFor JWT validation (Envoy, backend, etc.), you should still use: as the issuer, even if your app uses a custom domain everywhere else. Quick sanity checkIf you hit: you’ll see the keys used to validate those tokens — that’s what your verifier should trust. Docs gap (you’re right)You’re not wrong — this isn’t clearly documented right now. TL;DR
If you’re building anything strict (Envoy, API gateway, etc.), just lock issuer to the project-ref URL and you’ll be good. Hope that saves you some time — I ran into the same confusion before 😄 |
|
The documentation states:
This issue would make this impossible as the JWTs are tied to the project's default domain. |
|
consider to support custom domain? Otherwise, I would agree with that the Custom Domain feature is half-baked |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context
I have a Custom Domain addon (not vanity subdomain) that is fully active and serving traffic. After activating the custom domain and re-authenticating (signing out and back in), the JWT
issclaim still references the original<project-ref>.supabase.co/auth/v1URL rather than the custom domain.Expected behavior
The Custom Domains documentation states:
I expected the
issclaim in newly issued JWTs to reflect the custom domain (e.g.https://my-custom-domain.example.com/auth/v1), consistent with how OAuth callbacks andSAML EntityID are updated.
Actual behavior
Newly issued JWTs (after re-auth) still contain:
{ "iss": "https://<project-ref>.supabase.co/auth/v1" }Questions
This matters for anyone validating JWTs externally (e.g. in an Envoy proxy or a backend service) — if the iss doesn't match the custom domain, the issuer validation config needs to reference the original .supabase.co URL instead.
Thanks for any clarification!
All reactions