feat(frontend): use __Host prefix for token cookie
This commit is contained in:
parent
646c2694e1
commit
2b8e4c3e8d
8 changed files with 108 additions and 101 deletions
|
@ -19,6 +19,7 @@ import { AuthResponse, AuthUrls } from "~/lib/api/auth";
|
|||
import { ApiError, ErrorCode } from "~/lib/api/error";
|
||||
import ErrorAlert from "~/components/ErrorAlert";
|
||||
import { User } from "~/lib/api/user";
|
||||
import { tokenCookieName } from "~/lib/utils";
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => {
|
||||
return [{ title: `${data?.meta.title || "Log in"} • pronouns.cc` }];
|
||||
|
@ -61,7 +62,7 @@ export const action = async ({ request }: ActionFunctionArgs) => {
|
|||
return redirect("/", {
|
||||
status: 303,
|
||||
headers: {
|
||||
"Set-Cookie": writeCookie("pronounscc-token", resp.token),
|
||||
"Set-Cookie": writeCookie(tokenCookieName, resp.token),
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue