share links

This commit is contained in:
Milo Schwartz
2024-12-20 22:24:44 -05:00
parent 72dc02ff2e
commit 845d65ad33
31 changed files with 1281 additions and 212 deletions

View File

@@ -98,12 +98,14 @@ export async function authWithAccessToken(
);
}
const validCode = await verify(tokenItem.tokenHash, accessToken, {
memoryCost: 19456,
timeCost: 2,
outputLen: 32,
parallelism: 1
});
// const validCode = await verify(tokenItem.tokenHash, accessToken, {
// memoryCost: 19456,
// timeCost: 2,
// outputLen: 32,
// parallelism: 1
// });
logger.debug(`${accessToken} ${tokenItem.tokenHash}`)
const validCode = accessToken === tokenItem.tokenHash;
if (!validCode) {
return next(

View File

@@ -123,7 +123,6 @@ export async function authWithPassword(
const cookie = serializeResourceSessionCookie(
cookieName,
token,
resource.fullDomain
);
res.appendHeader("Set-Cookie", cookie);

View File

@@ -131,7 +131,6 @@ export async function authWithPincode(
const cookie = serializeResourceSessionCookie(
cookieName,
token,
resource.fullDomain
);
res.appendHeader("Set-Cookie", cookie);