Share sessions not working

38 views
Skip to first unread message

dirman

unread,
Sep 11, 2021, 10:46:52 AM9/11/21
to web2py-users
In my case, sessions are not shared in my two apps main and sub domain



session.connect(request, response,masterapp='test', db=db)

response.cookies[response.session_id_name]['domain'] = '.test.com


routers = dict(
  BASE=dict(
    default_controller='default',
    default_function='index',
    domains={
        'test.com':'redirect_to_www_test',
        'www.test.com':'test',
        'manage.test.com': 'manage_test'
    },
  )
)


Any help is appreciated

Rob Paire

unread,
Jan 18, 2022, 4:32:51 PM1/18/22
to web2py-users
Hi dirman
You probably have this figured out by now, but I bumped into a similar issue where sessions were not working. I think the reason is because I am not using the Auth module to validate users (and keep them logged in for 30 days).

Anyway, I copied the file:  ..\application\examples\models\session.py into the models folder of my application and sessions started working.

-Rob
Reply all
Reply to author
Forward
0 new messages