Commit 56cf0bcf authored by Grant's avatar Grant
Browse files

delete used auth sessions

parent c93a9bec
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@ app.post("/login/step/verify", async (req, res) => {
  const user = await APub.lookupActor(session.user_sub);
  if (!user) throw new Error("Code verification: user is not an actor!");

  await prisma.authSession.delete({ where: { id: session.id } });
  req.session.user = {
    sub: user.id!.toString(),
    handle: session.user_sub as any,