# Django web app - how to stay logged in

**URL:** <https://community.auth0.com/t/django-web-app-how-to-stay-logged-in/52718>\
**Category:** Get Help\
**Tags:** django, jwt, refresh-tokens\
**Created:** [November 5, 2020, 2:51am UTC](https://community.auth0.com/t/django-web-app-how-to-stay-logged-in/52718 "2020-11-05T02:51:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshendy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joshendy/32/12921_2.png) [@joshendy](https://community.auth0.com/u/joshendy)\
**Post date:** [November 5, 2020, 2:51am UTC](https://community.auth0.com/t/django-web-app-how-to-stay-logged-in/52718/1 "2020-11-05T02:51:35Z")

</div>

Hi there,

I’ve just started using auth0 in a project and have a strange use case where I want to display my web app 24/7 on a TV which auto refreshes every half hour. Problem being after 1 month (the max allowed period) auth0 will auto logout and on next refresh will then sit at the login screen.

To implement auth0 in my django app I followed the instructions at: [https://auth0.com/docs/quickstart/webapp/django/01-login](https://auth0.com/docs/quickstart/webapp/django/01-login)

I have learnt a small bit about refresh tokens but I’m unsure on how I could implement these into the example code that I used in the above quickstart instructions.

Has anyone done this before or could point me in the right direction?

Thanks,  
Joshua

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 5, 2020, 10:30pm UTC](https://community.auth0.com/t/django-web-app-how-to-stay-logged-in/52718/3 "2020-11-05T22:30:03Z")

</div>

Hi @joshendy,

Welcome to the Community!

How will the user authenticate on the TV? This sounds similar to a [device flow](https://auth0.com/docs/flows/device-authorization-flow) use-case. Let me know if that solves this problem without having to work around too much.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 30, 2020, 9:10pm UTC](https://community.auth0.com/t/django-web-app-how-to-stay-logged-in/52718/4 "2020-11-30T21:10:24Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
