You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to rebuild the Hacker news web app, without using a database, and store user information (username) in cookies. Using a model similar to yours, I am currently able to add the username to the cookie header, but I am unable to delete. Here is the code for the login page, specifically the action that adds the cookie:
export async function action({ request }) {
const session = await getSession(request.headers.get("Cookie"));
const form = await request.formData();
const username = form.get("name");
const Password = form.get("password");
// Login succeeded, send them to the home page.
return redirect("http://localhost:3000/", {
headers: {
"Set-Cookie": username,
},
});
}
Description
I am trying to rebuild the Hacker news web app, without using a database, and store user information (username) in cookies. Using a model similar to yours, I am currently able to add the username to the cookie header, but I am unable to delete. Here is the code for the login page, specifically the action that adds the cookie:
And here is the logout page:
Is there anything that I might be missing?
The text was updated successfully, but these errors were encountered: