Django request.session persist between logins of different users.

22 views
Skip to first unread message

Mateusz Wasielewski

unread,
Jun 8, 2021, 2:17:14 AM6/8/21
to Django users
Hello, 
I want to implement two factor authetication in my django app. The steps are as follows:
1. User need to register
2. User need to login
3. As login user, user need to send a token for verification, if verification is ok, I set the variable like this request.session['token']=True. 

I have a problem cause when I login as different users this session variable is still set to true. I am probably missing something, I assume that request.session is per user not per whole app.

Best regard
Mateusz Wasielewski

Williams Andy Inc

unread,
Jun 8, 2021, 3:57:06 AM6/8/21
to django...@googlegroups.com
Did you have your own logout function view or class view?


--
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/8af41ff9-f313-4d2e-bd12-4e113f531e1bn%40googlegroups.com.

Mateusz Wasielewski

unread,
Jun 8, 2021, 4:14:02 AM6/8/21
to django...@googlegroups.com
Hello,

Sorry that was postman problem, the old session_id was stored and when I logged by different user the old session id was still there. My mistake. 

Thanks for help. 



You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/f2ee3Ketrys/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPCthNK4Cq%3Dt3s9JU8yaa1UCWyWH4nY30o-%3D4Oj0XYAWdRphZQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages