I'm wondering if session management can be effectively implemented in a Single Page Application.
Is it even possible to achieve this with an approach like the one below?
export async function clientAction({ request }: Route.ClientActionArgs) {
const session = await getSession(
request.headers.get("Cookie")
);
return redirect("/login", {
headers: {
"Set-Cookie": await destroySession(session),
},
});
};