# Google Sign-In fails with redirect\_uri\_mismatch when using custom domain

**URL:** <https://community.auth0.com/t/google-sign-in-fails-with-redirect-uri-mismatch-when-using-custom-domain/189263>\
**Category:** Get Help\
**Tags:** free-trial, login-experience\
**Created:** [July 16, 2025, 1:35pm UTC](https://community.auth0.com/t/google-sign-in-fails-with-redirect-uri-mismatch-when-using-custom-domain/189263 "2025-07-16T13:35:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![younes048](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/younes048/32/75736_2.png) [@younes048](https://community.auth0.com/u/younes048)\
**Post date:** [July 16, 2025, 1:35pm UTC](https://community.auth0.com/t/google-sign-in-fails-with-redirect-uri-mismatch-when-using-custom-domain/189263/1 "2025-07-16T13:35:11Z")

</div>

I’m facing an issue when trying to use **Google Sign-In** with **Auth0 + custom domain (`auth.whosserver.com`)**. Everything works fine with username/password login, but as soon as I try Google login, I get the following error:

> **Error 400: redirect\_uri\_mismatch**

I’m developing locally using Vite at `http://localhost:5173`. In my Auth0 application settings, I’ve set the **callback URL to** :  
`http://localhost:5173/callback`

 ![image](https://global.discourse-cdn.com/auth0/original/3X/9/4/94b342b903d92cc1aa6bce754f00d4570ef94135.png)

This exact redirect URI is also added in the Google Cloud Console under my OAuth 2.0 Client ID settings as an **Authorized redirect URI**.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/c/2/c27e20f535e54e2fb4cbb28409b0864877daa205.png)

Despite this, I still get the same error. I’ve tried other variants as well, such as:

- `https://auth.whosserver.com/callback`
- `https://auth.whosserver.com/login/callback`
- `http://localhost:5173`

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [July 22, 2025, 7:05pm UTC](https://community.auth0.com/t/google-sign-in-fails-with-redirect-uri-mismatch-when-using-custom-domain/189263/3 "2025-07-22T19:05:25Z")

</div>

Hi @younes048,

Welcome to the Auth0 Community!

As mentioned in our [documentation](https://auth0.com/docs/customize/custom-domains/configure-features-to-use-custom-domains#configure-social-identity-providers) regarding custom domains, when you are using them with other features such as the social IdPs, you will need to configure the IdPs Authorized Redirect URIs to include `https://<YOUR-CUSTOM-DOMAIN>/login/callback`. Make sure that you are not using Auth0 Developer Keys once you have set up the custom domain.

I believe this should solve this, and if you have further inquires please let me know.  
Kind regards,  
Remus

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 5, 2025, 7:05pm UTC](https://community.auth0.com/t/google-sign-in-fails-with-redirect-uri-mismatch-when-using-custom-domain/189263/4 "2025-08-05T19:05:39Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
