By default the session cookie will not be shared across subdomains. Try 
adding something like the following in a model file in both apps:

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

Anthony

On Tuesday, July 1, 2014 4:07:17 AM UTC-4, Annet wrote:
>
> I have a front-end (init) and a back-end (myleoneuxs) application in db.py 
> of the init application I set:
>
> session.connect(request, response, masterapp="myleonexus")
>
> so they share the same session.
>
> The init application has the following menu items:
>
> {{if auth.is_logged_in():}}
>   <li><a href="{{=URL('myleonexus', 'default', 
> 'index')}}">myLeonexus</a></li>
> {{else:}}
>   <li><a href="{{=URL('myleonexus', 'default', 'user', 
> args='login')}}">Login</a></li>
> {{pass}}
>
>
> on 127.0.0.1:8000 this works. In production I needed to add a scheme and 
> host to the url
>
> {{if auth.is_logged_in():}}
>   <li><a href="{{=URL('myleonexus', 'default', 'index', scheme='https', 
> host='my.leonexus.com')}}">myLeonexus</a></li>
> {{else:}}
>   <li><a href="{{=URL('myleonexus', 'default', 'user', args='login', 
> scheme='https', host='my.leonexus.com')}}">Login</a></li>
> {{pass}}
>
> now the menu no longer works it contains the menu item 'login' even if the 
> user is logged in. What's the difference between
> the two, which causes it to no longer work?
>
> Regards,
>
> Annet
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to