Wednesday, December 11, 2019

Re: SuperUser not logging out after reboot

On 11/12/2019 8:19 pm, Bruckner de Villiers wrote:
>
> Running Django 3, Python 3.7.3, Chrome Browser on MacOS Catalina.
>
> All the code and db are on an external Volume.
>
> After a reboot (Restart on Mac), http://127.0.0.1:8000/admin/
> displayed the admin page without requesting a login.  Not good for
> serious apps.  Probably something in my Chrome setup.  Is there a way
> to log out a user automatically after a set period of time?
>

Django auth is based on sessions. If there is a cookie on your Mac which
is still valid after reboot no login will be required. You need to
logout to invalidate it.

https://docs.djangoproject.com/en/3.0/topics/http/sessions/

There is lots of scope to adjust default behaviour to suit particular
requirements.

Cheers

Mike


> Much obliged,
>
> Bruckner de Villiers
>
> 083 625 1086
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscribe@googlegroups.com
> <mailto:django-users+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/B80B7331-65D7-41DE-A22E-601A764E6A07%40gmail.com
> <https://groups.google.com/d/msgid/django-users/B80B7331-65D7-41DE-A22E-601A764E6A07%40gmail.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fc9514fb-c6f0-dd3d-7ce6-9951de159d4b%40dewhirst.com.au.

No comments:

Post a Comment