Allow participant to enter email to receive edit link (#534)

This commit is contained in:
Luke Vella 2023-03-03 16:50:50 +00:00 committed by GitHub
parent aab999598e
commit 0ac3c95755
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 230 additions and 81 deletions

View file

@ -143,10 +143,13 @@ export const decryptToken = async <P extends Record<string, unknown>>(
export const createToken = async <T extends Record<string, unknown>>(
payload: T,
options?: {
ttl?: number;
},
) => {
return await sealData(payload, {
password: sessionOptions.password,
ttl: 60 * 15, // 15 minutes
ttl: options?.ttl ?? 60 * 15, // 15 minutes
});
};