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. > On 8 Jun 2021, at 09:55, Williams Andy Inc <[email protected]> wrote: > > Did you have your own logout function view or class view? > > > On Tue, Jun 8, 2021 at 9:17 AM Mateusz Wasielewski > <[email protected] <mailto:[email protected]>> > wrote: > 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 > > -- > 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 [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/8af41ff9-f313-4d2e-bd12-4e113f531e1bn%40googlegroups.com > > <https://groups.google.com/d/msgid/django-users/8af41ff9-f313-4d2e-bd12-4e113f531e1bn%40googlegroups.com?utm_medium=email&utm_source=footer>. > > -- > 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 > <https://groups.google.com/d/topic/django-users/f2ee3Ketrys/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAPCthNK4Cq%3Dt3s9JU8yaa1UCWyWH4nY30o-%3D4Oj0XYAWdRphZQ%40mail.gmail.com > > <https://groups.google.com/d/msgid/django-users/CAPCthNK4Cq%3Dt3s9JU8yaa1UCWyWH4nY30o-%3D4Oj0XYAWdRphZQ%40mail.gmail.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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/DAA9E79C-6BFF-4F70-B645-A9760B7652CB%40gmail.com.

