Multi tab login issue: the request was rejected to protect you from Cross-Site-Request-Forgery #2064
-
Hello. We have an application built on top of Kratos SPA flows. When a non-logged in user opens application, we request new login flow from Kratos and show user the login form. If two application browser tabs are opened (in the same browser) for a non-logged in user, and then we login and logout in the first tab, and after that, try to login in the second tab, CSRF protection error occurs:
It can be suspected that flow and/or CSRF token associated with the second tab is invalidated after logout from the first tab. Is this an expected behavior? Probably in case of SPA flows we shall better request login flow and send login credentials in the same time - after user enters login/password to the form (and avoid requesting login flow in advance to avoid invalidation)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Using multiple tabs should not be a problem unless the browser has some plugin installed for tab isolation (eg FireFox containers) or is in incognito mode! |
Beta Was this translation helpful? Give feedback.
Using multiple tabs should not be a problem unless the browser has some plugin installed for tab isolation (eg FireFox containers) or is in incognito mode!