SuperUser not logging out after reboot

16 views
Skip to first unread message

Bruckner de Villiers

unread,
Dec 11, 2019, 9:20:13 AM12/11/19
to django...@googlegroups.com

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?

 

Much obliged,

 

Bruckner de Villiers

083 625 1086

Miracle

unread,
Dec 11, 2019, 10:09:05 AM12/11/19
to django...@googlegroups.com
Hello,

If you don't want to be logged in, you can simply log out before closing the local server. 
Another way is to tell your browser not to save the password whenever you are logging in.


I suppose you have atleast one email account or social media account. And I believe it logs you in automatically even after reboot.

In a nutshell, this is an expected behaviour.

 You can also clear the clear your browser cache for the page with "shift + F5"

Regards 


--
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...@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.

Bruckner de Villiers

unread,
Dec 11, 2019, 12:27:41 PM12/11/19
to django...@googlegroups.com

Thank you – thought that this is the case.  However, I am trying to cater for the user who forgot to log out.

Regards,

 

Bruckner de Villiers

083 625 1086

 

Mike Dewhirst

unread,
Dec 12, 2019, 5:23:20 AM12/12/19
to django...@googlegroups.com
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...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> <https://groups.google.com/d/msgid/django-users/B80B7331-65D7-41DE-A22E-601A764E6A07%40gmail.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages