# One authentication with multiple Angular apps

**URL:** <https://community.auth0.com/t/one-authentication-with-multiple-angular-apps/79803>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [March 14, 2022, 6:41am UTC](https://community.auth0.com/t/one-authentication-with-multiple-angular-apps/79803 "2022-03-14T06:41:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcfdez87](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mcfdez87/32/35829_2.png) [@mcfdez87](https://community.auth0.com/u/mcfdez87)\
**Post date:** [March 14, 2022, 6:41am UTC](https://community.auth0.com/t/one-authentication-with-multiple-angular-apps/79803/1 "2022-03-14T06:41:29Z")

</div>

I have an application developed with Angular where I have implemented the authentication system provided by the Auth0 Angular package. Everything works correctly.

I have developed a second application where I would like to protect the routes and make them accessible if the user has been authenticated in the first application.

What steps, in broad strokes, should I follow? So I can search for information…

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 15, 2022, 10:37pm UTC](https://community.auth0.com/t/one-authentication-with-multiple-angular-apps/79803/3 "2022-03-15T22:37:48Z")

</div>

Hi @mcfdez87,

Welcome to the Auth0 Community!

Are both of the apps authenticating through the same login? If so, SSO should work by default if you’re using Universal Login. [Single Sign-On](https://auth0.com/docs/authenticate/single-sign-on)

---

<div class="post-metadata">

**Author:** ![mcfdez87](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mcfdez87/32/35829_2.png) [@mcfdez87](https://community.auth0.com/u/mcfdez87)\
**Post date:** [March 16, 2022, 8:01am UTC](https://community.auth0.com/t/one-authentication-with-multiple-angular-apps/79803/4 "2022-03-16T08:01:23Z")

</div>

Hi @dan.woda ,

In the first application ([example.com](http://example.com)) I implemented the login button as indicated in the Angular documentation of Auth0. When clicking on it, it authenticates correctly and I can access to the routes protected by the AuthGuard provided by the module itself.

In the second application ([subdomain.example.com](http://subdomain.example.com)), I have simply added the AuthGuard in the routes, since I would like the user, when he enters to the application, to be already authenticated (that is, that he does not have to click again on any button).

However, when I access the second app, the AuthGuard redirects me to the Auth0 login page. What step am I leaving?

Thanks!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 16, 2022, 4:28pm UTC](https://community.auth0.com/t/one-authentication-with-multiple-angular-apps/79803/5 "2022-03-16T16:28:13Z")

</div>

Do you have a loginWithRedirect happening in your second app?

Could you share some of your code?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 25, 2022, 9:19pm UTC](https://community.auth0.com/t/one-authentication-with-multiple-angular-apps/79803/6 "2022-05-25T21:19:06Z")

</div>


