swift-island-66287
01/22/2023, 9:21 AMcreateBrowserLogoutFlow
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:
const { data } = await kratosPublicApi.createBrowserLogoutFlow({ cookie });
await kratosPublicApi.updateLogoutFlow({ token: data.logout_token });
plain-journalist-56055
01/24/2023, 7:10 AMswift-island-66287
01/25/2023, 3:18 AMcookie
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.