Saturday, 13 June 2026

jwt and password save how it work in fastapi

 https://chat.qwen.ai/s/fd9e8eba-008c-4285-bc73-3a987a87d099?fev=0.2.64


response.delete_cookie(
"access_token"


// Inside Dashboard.jsx useEffect frontend se remove ke liye

try {

  const res = await api.get("/dashboard");

  // show data

} catch (error) {

  if (error.response && error.response.status === 401) {

    // Cookie expired or invalid! Clean up and kick them out.

    localStorage.removeItem("user");

    navigate("/");

  }

}

No comments:

Post a Comment

Hello

jwt and password save how it work in fastapi

 https://chat.qwen.ai/s/fd9e8eba-008c-4285-bc73-3a987a87d099?fev=0.2.64 response . delete_cookie( "access_token" )  //...