Is that line in a login_onaccept callback function? If so, you would only
get that error if you submit a login form but the login fails. To prevent
that, add the following condition:
if auth.user:
session.auth.expiration = response.session_cookie_expires = auth.
settings.long_expiration
Anthony
On Tuesday, September 8, 2015 at 12:15:07 PM UTC-4, Robert Porter wrote:
>
> Your second response sounds good, but it's posting an error for:
>
> session.auth.expiration = response.session_cookie_expires =
> auth.settings.long_expiration
>
> The error is: 'NoneType' object has no attribute 'expiration'
>
> That seems to imply that session.auth doesn't exist? I haven't changed
> anything from vanilla with session/auth...
>
> On Saturday, 5 September 2015 21:55:26 UTC-7, Robert Porter wrote:
>>
>> How can I make a login persistent. I want you to have to clean your
>> cookies to ever be logged out.
>>
>> Right now I have a bug where I get logged out after a pretty short time
>> (even though I set auth.settings.expiration=36000000), so I just want a way
>> where you absolutely cannot logout unless you clean your cookies or hit my
>> logout button. I want to disable the possibility, not just "extend" the
>> expiration.
>>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.