Skip to content

Commit

Permalink
feat: extend the time span of our user cookie (#289)
Browse files Browse the repository at this point in the history
Currently, our cookie only exists for 2 days. In order to make the onboarding process much more consistent. We want to extend the time span of our user cookie to 30 days.
  • Loading branch information
EiffelFly committed Oct 3, 2022
1 parent fa7ecc3 commit 76a6f99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/api/set-user-cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
cookie_token: body.token,
}),
domain: req.headers.origin ? new URL(req.headers.origin).hostname : null,
maxAge: 60 * 60 * 24 * 2,
maxAge: 60 * 60 * 24 * 30,
httpOnly: process.env.NODE_ENV === "production" ? true : false,
};

Expand Down

0 comments on commit 76a6f99

Please sign in to comment.