login expiration time

63 views
Skip to first unread message

Warwick JC

unread,
Jul 24, 2020, 12:45:17 AM7/24/20
to web2py-users
Hello.

I have a web2py html page (e.g. idex.html)  that has another page in iframe within the app. After session timeout, I get redirected back to the login page which works at the iframe page and not the main page.

I used this in the model.py: 

auth.settings.expiration = 1800


The problem is that I cant get the redirection done from the index.html page but happens at the iframe page.

How can I achieve this? Is there another place that I can place the 'auth.settings.expiration'

Regards

villas

unread,
Jul 24, 2020, 8:20:13 AM7/24/20
to web2py-users
If you are using an iframe to display a page from the same app,  I have the impression that your design might be wrong. You will probably find a better way after you give this a little more thought. Sorry if this answer does not seem so helpful.

Warwick JC

unread,
Jul 24, 2020, 4:21:03 PM7/24/20
to web...@googlegroups.com
Thanks.
Is it wrong to have iframe pages from the same app?
Regards

On Fri, 24 Jul 2020 at 15:20, villas <vill...@gmail.com> wrote:
If you are using an iframe to display a page from the same app,  I have the impression that your design might be wrong. You will probably find a better way after you give this a little more thought. Sorry if this answer does not seem so helpful.

--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/36155787-351a-479c-8534-3c0c58e333dfo%40googlegroups.com.

Warwick JC

unread,
Jul 26, 2020, 12:22:41 AM7/26/20
to web2py-users
Actually I got kind of a workaround.
In my iframe, a redirect to the login page was distorting the page since the user.html was not resized.
So I did this to escape the iframe and go full-page:
<script>

this.top.location !== this.location && (this.top.location = this.location);

</script>

On Friday, 24 July 2020 23:21:03 UTC+3, Warwick JC wrote:
Thanks.
Is it wrong to have iframe pages from the same app?
Regards

On Fri, 24 Jul 2020 at 15:20, villas <vill...@gmail.com> wrote:
If you are using an iframe to display a page from the same app,  I have the impression that your design might be wrong. You will probably find a better way after you give this a little more thought. Sorry if this answer does not seem so helpful.

--
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+unsubscribe@googlegroups.com.

villas

unread,
Jul 27, 2020, 12:22:33 PM7/27/20
to web2py-users
It isn't really 'wrong' as such,  but it is usually not the best or most flexible way of displaying your own html content.

Iframes are normally used to embed and isolate third-party content into your website, e.g. advertisements. 

The iframe allows a method of ceding control of a portion of your screen to be taken over and used by 'someone else' e.g.  perhaps a credit card payment gateway,  a PDF viewer,  or simply pages from other websites.



On Friday, 24 July 2020 21:21:03 UTC+1, Warwick JC wrote:
Thanks.
Is it wrong to have iframe pages from the same app?
Regards

On Fri, 24 Jul 2020 at 15:20, villas <vill...@gmail.com> wrote:
If you are using an iframe to display a page from the same app,  I have the impression that your design might be wrong. You will probably find a better way after you give this a little more thought. Sorry if this answer does not seem so helpful.

--
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 web...@googlegroups.com.

Warwick JC

unread,
Jul 28, 2020, 3:31:18 AM7/28/20
to web...@googlegroups.com
Thanks. I appreciate it. 

To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/fa3134f2-75d9-4e71-8315-02e5289713f2o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages