# Single login app for multiple applications

**URL:** <https://community.auth0.com/t/single-login-app-for-multiple-applications/106969>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [May 16, 2023, 12:25am UTC](https://community.auth0.com/t/single-login-app-for-multiple-applications/106969 "2023-05-16T00:25:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![imad](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/imad/32/34807_2.png) [@imad](https://community.auth0.com/u/imad)\
**Post date:** [May 16, 2023, 12:25am UTC](https://community.auth0.com/t/single-login-app-for-multiple-applications/106969/1 "2023-05-16T00:25:35Z")

</div>

Hello,

I am trying to create a login app for multiple applications. Here’s the scenario:

- User goes to a protected page within app [https://app1.domain.com](https://app1.domain.com)
- Auth0 detects user is unauthenticated and redirects to [https://auth.domain.com](https://auth.domain.com)
- User is successfully authenticated and redirected back to [https://app1.domain.com](https://app1.domain.com)  
\*User clicks on [https://app2.domain.com](https://app2.domain.com), browser redirects user. Since user is already authenticated, user lands protected page

What was done:

- Created 3 applications in Auth0
- All apps (auth, app1 & app2) point to the same callback url ([https://auth.domain.com/api/auth/callback](https://auth.domain.com/api/auth/callback))

Results:  
When user lands on protected page in [https://app1.domain.com](https://app1.domain.com), user is redirected to error page with the following error message:  
**unauthorized\_client** : Callback URL mismatch. [https://tapp1.domain.com/api/auth/callback](https://tapp1.domain.com/api/auth/callback) is not in the list of allowed callback URLs

Do I have this setup/configured correctly?

Thanks,  
IJ

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [May 29, 2023, 7:58am UTC](https://community.auth0.com/t/single-login-app-for-multiple-applications/106969/3 "2023-05-29T07:58:01Z")

</div>

Hey there @imad,

For each of your applications in Auth0 tenant, there is a need to set The callback URLs pointing back to the specific application URL. (It still means they all have the same Login page.).

As an example, if you want to let your users to log in into [https://app1.domain.com](https://app1.domain.com), once they are authenticated by Auth0 server, the will be redirected to **this** application, so the callback url must be [ttps://app1.domain.com](https://app1.domain.com/).

---

<div class="post-metadata">

**Author:** ![imad](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/imad/32/34807_2.png) [@imad](https://community.auth0.com/u/imad)\
**Post date:** [May 29, 2023, 10:09am UTC](https://community.auth0.com/t/single-login-app-for-multiple-applications/106969/4 "2023-05-29T10:09:00Z")

</div>

Hey @marcelina.barycka ,

thank you so much for your response, that makes sense. I am just a bit lost in terms of how I force users of [https://app1.domain.com](https://app1.domain.com) to redirect to [https://auth.domain.com](https://auth.domain.com)? Do I need to configure the Tenant Login URI to point to the auth app?

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

thanks,  
Imad

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [May 29, 2023, 1:20pm UTC](https://community.auth0.com/t/single-login-app-for-multiple-applications/106969/6 "2023-05-29T13:20:15Z")

</div>

Hey there,

Once you’ve registered apps on your auth0 tenant, you can start building the integration on your app stack level, optionally leveraging auth0-supported libraries that, among others, builds the required routes for the authentication. For your run environment, providing Auth0 configuration variables, like the auth0 domain (and a few others), is required.  
I encourage you to review the documentation for your specific use case. [Here’s](https://auth0.com/docs/quickstart/webapp/express/01-login#integrate-auth0) an example on how to do so step by step for a regular node js web app with Express framework, utilising the express-openid-connect package.

---

<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:** [June 12, 2023, 1:20pm UTC](https://community.auth0.com/t/single-login-app-for-multiple-applications/106969/7 "2023-06-12T13:20:43Z")

</div>

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