One authentication with multiple Angular apps

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…

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

Hi @dan.woda ,

In the first application (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), 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!

Do you have a loginWithRedirect happening in your second app?

Could you share some of your code?