Getting session info from subdomains to the parent domain [Django]

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:

  • Team 1 ( team1.example.com )
  • 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 .

    链接地址: http://www.djcxy.com/p/33738.html

    上一篇: 我可以在Django中使用HTTP基本认证吗?

    下一篇: 从子域获取会话信息到父域[Django]