added resource auth status cards and moved login to reusable login form

This commit is contained in:
Milo Schwartz
2024-11-23 17:56:21 -05:00
parent 795c144e1e
commit 78b23a8956
14 changed files with 507 additions and 454 deletions

View File

@@ -13,6 +13,7 @@ import {
createResourceSession,
serializeResourceSessionCookie,
} from "@server/auth/resource";
import logger from "@server/logger";
export const authWithPasswordBodySchema = z.object({
password: z.string(),
@@ -132,9 +133,10 @@ export async function authWithPassword(
resource.fullDomain,
secureCookie
);
res.appendHeader("Set-Cookie", cookie);
logger.debug(cookie); // remove after testing
return response<null>(res, {
data: null,
success: true,