Custom domain on Convex Auth
Hi! I upgraded to Convex Pro to get a custom domain working on my OAuth providers. I've completed all the steps described here to use a CUSTOM_AUTH_SITE_URL, but I still see the long url "....convex.site" that doesn't appear trustworthy to users. Any help? I applied for Google verification, but that process takes a long time so I would appreciate help in the meantime!
Advanced: Details - Convex Auth
Authentication library for your Convex backend
13 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Where do you see it?
Just to double check -- there's no reference to
.convex.site
in your OAuth provider (like for Google if you open up the app in the GCP dashboard), just references to your custom domain?@Tom I see that on the OAuth consent screen. Here's a screenshot!

@sshader I do have a redirect URIs for the .convex.site in my GCP app. When I try to replace it in favor of the custom domain one I get the following error

Can you check how the GitHub OAuth URL that the browser redirects you to is different in each situation?
clicking "see error details" looks useful
"redirect_uri_mismatch" sounds like the redirect you configured the GitHub OAuth app with and the CUSTOM_AUTH_SITE_URL might not match
Here's what I see on "see error details". Just a reminder, this is when I get rid of the .convex.site redirect URI on GCP

@Tom Is this what you were looking for? This is the url I get redirected to when getting authenticated with GitHub.
Btw I also still have the "convex.site" callback on GitHub because when I try switching to the custom domain I get the following screen.
Just to double check, do I need to change my auth.config.ts?
I currently have:
export default {
providers: [
{
domain: process.env.CONVEX_SITE_URL,
applicationID: "convex",
},
],
};


Configuration that is working for me:
* Convex environment variable
CUSTOM_AUTH_SITE_URL
set to https://my-domain.com
(you can check this in the Convex dashboard, making sure it's the right instance, which in your case sounds like healthy-wombat-259
)
* Redirect URI in the GCP console set to https://my-domain.com/api/auth/callback/google
* No changes to auth.config.ts
or auth.ts
Oh other things to double check -- make sure you're on a recent version of @convex-dev/auth
, and that you've had a successful push to your convex deployment -- I'm on 0.0.80 (which I checked with npm ls
)I'm on 0.0.76 - I'll try upgrading
that sounds like it, this feature was added in 0.0.78 https://github.com/get-convex/convex-auth/blob/main/CHANGELOG.md#0078-1
Thanks! I'm sure that'll be it! I can't confirm that works yet though - I looks like migrating changed the worflow and I'm being redirected to pages I don't have in my webapp. I'll confirm whether upgrading solves it after I fix these new issues!

Success!! Thanks both of you for the help!