Skip to content

Commit

Permalink
fix(Authentication): cookie setting not finished
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsKoud committed Oct 16, 2023
1 parent 9c9e730 commit 6b366b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/server/src/trpc/v1/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const AuthRoute = t.router({

server.adminAuditLogs.register("Login", `${ua.browser.name}-${ua.browser.version} on ${ua.os.name}-${ua.os.version}`);
res.cookie("PAPERPLANE-ADMIN", Auth.createJWTToken("admin", config.encryptionKey), { maxAge: 6.048e8 });
await new Promise((res) => setTimeout(res, 1e3));
return;
}

Expand All @@ -75,6 +76,7 @@ export const AuthRoute = t.router({

domain.auditlogs.register("Login", `${ua.browser.name}-${ua.browser.version} on ${ua.os.name}-${ua.os.version}`);
res.cookie("PAPERPLANE-AUTH", Auth.createJWTToken(domain.pathId, config.encryptionKey), { maxAge: 6.048e8 });
await new Promise((res) => setTimeout(res, 1e3));
return;
}

Expand All @@ -97,6 +99,7 @@ export const AuthRoute = t.router({

domain.auditlogs.register("Login", `${ua.browser.name}-${ua.browser.version} on ${ua.os.name}-${ua.os.version}`);
res.cookie("PAPERPLANE-AUTH", Auth.createJWTToken(domain!.pathId, config.encryptionKey), { maxAge: 6.048e8 });
await new Promise((res) => setTimeout(res, 1e3));
}),
signup: SignUpAuthRoute,
reset: ResetAuthRoute,
Expand Down

0 comments on commit 6b366b9

Please sign in to comment.