0

I have a Django app that is hosted in a example.com. Users create groups/team, and each team gets a unique subdomain. Ex: team1.example.com

Users log into their team from the team's subdomain. User A who is in team1 will log in from team1.example.com/login/. I have set it up this way so that two users logging in from the same browser for different teams (user A in team1.example.com and user B in team2.example.com), can maintain two separate sessions.

Now the parent domain is www.example.com, and when user visits the parent domain, i want to be able to show the active sessions of all logged in users. Something like:


Active sessions:

  1. Team 1 (team1.example.com)
  2. Team 2 (team2.example.com)

I am using Django All-auth for authentication.

NOTE: I am aware of the method making COOKIE_DOMAIN_NAME=".example.com" and having shared sessions across sub domains. I want to be able to maintain separate sessions for each sub domain.

Abhishek Menon
  • 753
  • 4
  • 15
  • @Sayse could you please elaborate? – Abhishek Menon Nov 20 '17 at 18:12
  • I am using `django-hosts` for achieving multitenancy (one of the packages mentioned in the grid). The problem i am facing is to be able to identify subdomain login sessions from the parent domain. I know this is achievable as Slack does it. When i log into slack.com, under Your Workspaces they are able to show the active sessions in the subdomains (team1.slack.com etc) – Abhishek Menon Nov 20 '17 at 18:24
  • did you find solution to resolve this problem, I am facing almost the same problem, I want to know if user is authenticated in a site while I am in different one – ladhari Feb 24 '21 at 05:02

0 Answers0