mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-04 10:05:53 +02:00
more visual enhancements and use expires instead of max age in cookies
This commit is contained in:
parent
759434e9f8
commit
adef93623d
17 changed files with 151 additions and 137 deletions
|
@ -170,9 +170,13 @@ export async function signup(
|
|||
// });
|
||||
|
||||
const token = generateSessionToken();
|
||||
await createSession(token, userId);
|
||||
const sess = await createSession(token, userId);
|
||||
const isSecure = req.protocol === "https";
|
||||
const cookie = serializeSessionCookie(token, isSecure);
|
||||
const cookie = serializeSessionCookie(
|
||||
token,
|
||||
isSecure,
|
||||
new Date(sess.expiresAt)
|
||||
);
|
||||
res.appendHeader("Set-Cookie", cookie);
|
||||
|
||||
if (config.getRawConfig().flags?.require_email_verification) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue