Merge branch 'workstream-i'

This commit is contained in:
RevIQ
2026-01-09 18:12:45 +08:00
30 changed files with 2365 additions and 9 deletions

View File

@@ -109,7 +109,13 @@ const verifyRegistration = os.auth.webauthn.verifyRegistration
context.allowedOrigins,
context.rpName,
);
await verifyReg(context.db, rpInfo, context.user.id, challengeId, response);
return verifyReg(
context.db,
rpInfo,
context.user.id,
challengeId,
response,
);
});
const createAuthenticationOptions = os.auth.webauthn.createAuthenticationOptions
@@ -162,6 +168,7 @@ const meGet = os.me.get.use(authMiddleware).handler(async ({ context }) => {
"avatar_url",
"email_verified_at",
"is_superuser",
"password_hash",
])
.where("id", "=", context.user.id)
.executeTakeFirstOrThrow();
@@ -176,6 +183,7 @@ const meGet = os.me.get.use(authMiddleware).handler(async ({ context }) => {
emailVerified: user.email_verified_at !== null,
needsSetup: user.display_name === null,
isSuperuser: user.is_superuser,
hasPassword: user.password_hash !== null,
};
});