Convex Auth + Google + Custom Domain
Hey Convex team, I've configured Convex Auth with Google and it works great, except my Convex
.site
domain is being used even though I have a custom HTTP Actions domain configured in both Convex and Google Auth Platform.
The Convex URL shows up in the Google sign-in page, which makes it look untrustworthy to my customer (see screenshot) -- I need this page to display my custom subdomain instead.
I tried editing the domain
value in my auth.config.ts
, but this doesn't help -- it seems process.env.CONVEX_SITE_URL
is hardcoded in several places.
I couldn't find any places where that domain
variable from auth.config.ts
is used in convex-auth
, but I did notice it shows up in the Convex Deployment Settings UI under /settings/authentication
. Would it possible (and would it fix this) to use this domain
value instead of the hard-coded CONVEX_SITE_URL
in convex-auth
?
The setup script already auto-populates domain: process.env.CONVEX_SITE_URL
in auth.config.ts
, so it shouldn't break anything.
Thanks in advance,
Charlie4 Replies
Looks like this is a known issue: https://discord.com/channels/1019350475847499849/1311074667791913022
Also looks like a potentially decent workaround in the related GitHub issue: https://github.com/get-convex/convex-auth/issues/53#issuecomment-2536298464
GitHub
Support custom redirect domains · Issue #53 · get-convex/convex-auth
So you don't have a .convex.site url in the OAuth flow. It doesn't necessarily need to replace issuer & other uses, but being able to redirect to it would be nice
Thank you! Sorry for the duplicate issue. The Google verification flow is a bit arduous, I would rather just use the subdomain
Woah, what?! That’s wild. Yeah, hard agree there