I am using wildcard domains to create multitenant applications as below.
My react application is hosted in cloudfront using wildcard domains *.app.abc.com and backend in IIS using *.api.app.abc.com. According to this setup tenant1 app uses tenant1 apis.
Currently, backend api has cookie based authentication setup using asp net core authentication middleware. It is working fine for a user loggin into tenant1.app.abc.com but I am not able to achieve simultaneous login by multiple users on different subdomains(tenant2 in tenant2.app.abc.com).
I can see browser is receiving cookies based on subdomains but tenant1 cookie expires as soon as I login to tenant2. I have done some reasearch but was not able to find anything relevant to this situation e.g. Multiple & SubDomain's cookie in asp.net Core Identity post and few other posts explain how to share cookie between subdomains but not applicable to my case.
So my questions are
is it possible to implement multitenancy(multiple user logins in the same browser) using cookie based authentication? If yes how to do it.
do I need to consider other options?