hey team, any idea why the `createBrowserLogoutFlo...
# talk-kratos
s
hey team, any idea why the
createBrowserLogoutFlow
works but the
updateLogoutFlow
that follows it, does not? I get 401. Same thing If I try to visit the logout_url. It says that the session is inactive:
Copy code
const { data } = await kratosPublicApi.createBrowserLogoutFlow({ cookie });
		await kratosPublicApi.updateLogoutFlow({ token: data.logout_token });
p
Hey, any update here? Ran into the same issue 😞
s
hey @plain-journalist-56055 not sure if you’ve managed to fix your issue, but I’ve managed to fix mine. the issue was the following: the logout flow, happens in the frontend, while my login flow was happening in the backend. which means that the ory_kratos_session was also stored in the BE. You might have noticed that the updateLogoutFlow does not take a
cookie
in the payload, because it expects to find it in the browser cookies (so it can delete it). To fix, I removed the
updateLoginFlow
from the BE, and handled the login in the frontend, by submitting the form to kratos directly (
ui.method
and
ui.action
), which after a successful request, stores the cookie in the browser.