# Not able to login for Auth0 in the Render Preview PR build

**URL:** <https://community.auth0.com/t/not-able-to-login-for-auth0-in-the-render-preview-pr-build/188610>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [June 30, 2025, 8:21pm UTC](https://community.auth0.com/t/not-able-to-login-for-auth0-in-the-render-preview-pr-build/188610 "2025-06-30T20:21:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yadavshivharakhyadav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yadavshivharakhyadav/32/74891_2.png) [@yadavshivharakhyadav](https://community.auth0.com/u/yadavshivharakhyadav)\
**Post date:** [June 30, 2025, 8:21pm UTC](https://community.auth0.com/t/not-able-to-login-for-auth0-in-the-render-preview-pr-build/188610/1 "2025-06-30T20:21:47Z")

</div>

Hi community 👋

I’m using **Auth0 with a Next.js application** , deployed on **Render**.

- ✅ The login works fine on the **main domain** :  
`https://testproject-com-next.onrender.com`
- ❌ But when I try to log in from a **PR deployment** , for example:  
`https://testproject-com-pr-80.onrender.com`  
— the login **fails or redirects incorrectly** , and I can’t complete authentication.

The PR deployment itself is working and reachable, but the login doesn’t succeed.  
when i create my PR preview render will like this.

[https://tesproject-com-pr-80.onrender.com/](https://tesproject-com-pr-80.onrender.com/)

and when i login after that it redirect to the

[https://testproject-com-next.onrender.com/auth/callback?code=XRwy\_x6bXazWl7jIkCAEcigXDX0KZOeRYtuvEmO9zBbsV&state=LsULUnGtb44-W28rozpgtVmH1cxJnI\_dP0rxUsYFKyk](https://testproject-com-next.onrender.com/auth/callback?code=XRwy_x6bXazWl7jIkCAEcigXDX0KZOeRYtuvEmO9zBbsV&state=LsULUnGtb44-W28rozpgtVmH1cxJnI_dP0rxUsYFKyk)  
I’m sharing render screen shot.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/8/0/80d1c5fd52582cd2b9811426e63ab05791c87c9c.png)  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/f/f/ff6a2c6a20ed95ed3b1dc04c24c68484c54a7d61.png)

I don’t know whether there is issue with the auth0 or render?  
Can you one guide me on this?

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [June 30, 2025, 9:41pm UTC](https://community.auth0.com/t/not-able-to-login-for-auth0-in-the-render-preview-pr-build/188610/2 "2025-06-30T21:41:53Z")

</div>

Hi @yadavshivharakhyadav

Welcome back to the Auth0 Community!

Thank you for posting your question. When you make a build based on the PR, do you change the APP\_BASE\_URL to match the “new” domain that your application is hosted on?

For the settings in the Auth0, you can also use wildcards → Here’s more details about that [https://auth0.com/docs/get-started/applications/wildcards-for-subdomains#wildcard-url-placeholders](https://auth0.com/docs/get-started/applications/wildcards-for-subdomains#wildcard-url-placeholders)

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![yadavshivharakhyadav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yadavshivharakhyadav/32/74891_2.png) [@yadavshivharakhyadav](https://community.auth0.com/u/yadavshivharakhyadav)\
**Post date:** [July 1, 2025, 2:20am UTC](https://community.auth0.com/t/not-able-to-login-for-auth0-in-the-render-preview-pr-build/188610/3 "2025-07-01T02:20:37Z")

</div>

Hello @dawid.matuszczyk,  
Thank you for your response. I’m sharing my app\_base\_url.

My Render Application have below url in the app\_base\_url.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/9/6/96fdf02d20a75986f2b9377a7fd600feee6532e1.png)

In my auth0 application below urls added.  
**Allowed Callback**  
[http://localhost:3000/auth/callback](http://localhost:3000/auth/callback), [testproject.com](https://testproject.com/auth/callback), [https://testproject-com-next.onrender.com/auth/callback](https://testproject-com-next.onrender.com/auth/callback),

**Allowed Logout URLs**  
[http://localhost:3000/](http://localhost:3000/), [https://testproject.com/](https://testproject.com/), [https://testproject-com-next.onrender.com](https://testproject-com-next.onrender.com)

**Allowed Web Origins**  
[http://localhost:3000/](http://localhost:3000/), [https://testproject.com/](https://testproject.com/), [https://testproject-com-next.onrender.com](https://testproject-com-next.onrender.com)

I want to mention that whenever I create a pull request, a new preview domain is generated for each PR. For example:

- PR80: [https://tesproject-com-pr-80.onrender.com/](https://tesproject-com-pr-80.onrender.com/)
- PR81: [https://tesproject-com-pr-81.onrender.com/](https://tesproject-com-pr-81.onrender.com/)
- PR82: [https://tesproject-com-pr-82.onrender.com/](https://tesproject-com-pr-82.onrender.com/)

Since a new domain is created every time, it’s not feasible to manually add each one to the `APP_BASE_URL`.

So how can i overcome from thi problem.

---

<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:** [July 15, 2025, 2:20am UTC](https://community.auth0.com/t/not-able-to-login-for-auth0-in-the-render-preview-pr-build/188610/4 "2025-07-15T02:20:55Z")

</div>

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