If I already logged in from one app(sub domain) why auth0 redirects to login screen for another app (sub domain)

I have two client apps both are integrated with Auth0- OpenID identity layer and build in Asp.net core 3.1, for Login we are using Universal Login method and custom domain. We are using common connection for all apps ( [Username-Password-Authentication]) but different auth0 application.

Client 1: “xyz-domain-com”
Auth0 - Application : xyz
Cookies : -domain-com

Client 2 : “abc-domain-com”
Auth0 - Application : abc
Cookies : -domain-com

We having trouble, when user open the app “xyz-domain-com” in a browser it ask for UL login and user successfully enter into that application but when they tried open another client application that’s in same domain but diff sub domain “abc-domain.-com” it again ask for login.

We are using cookie authentication that is shared between sub domains, but still need to put same credentials again and again.Did I miss any configuration ?

Code example

.AddCookie(options =>
{
options.LoginPath = new PathString("/Auth/Login");
options.Cookie.Domain = Configuration[“Auth0:CookieDomain”];
}).AddOpenIdConnect(“Auth0”, options =>
{
options.Authority = Configuration[“Auth0:Domain”];
options.ClientId = Configuration[“Auth0:ClientId”];
options.ClientSecret = Configuration[“Auth0:ClientSecret”];

So on…

Hi @subincv,

I’d recommend following the troubleshooting guide below in the first instance

1 Like

Let us know if you have any more questions once you try out the doc that Andy provided.

Thanks for the document but it not helped in my issue, I am not facing issue while login and logout.

There are 2 client app both are on same host domain but different sub domains, when user already logged in one client app it still ask for login in second app, it should be auto login because user is already authenticated.

Hi konrad.sopal

Any suggestion how can I do that ?