Merge branch 'workstream-f1'

This commit is contained in:
RevIQ
2026-01-09 03:31:58 -05:00
16 changed files with 205 additions and 61 deletions

View File

@@ -34,13 +34,13 @@ export const authMiddleware = os.middleware(async ({ context, next }) => {
let tokenHash: string | undefined;
const sessionToken = getCookie(reqHeaders, COOKIE_NAMES.SESSION_TOKEN);
if (sessionToken) {
tokenHash = hashToken(sessionToken);
tokenHash = await hashToken(sessionToken);
}
// Fall back to API key header (for CLI)
const apiKey = reqHeaders.get("x-api-key");
if (!tokenHash && apiKey) {
tokenHash = hashToken(apiKey);
tokenHash = await hashToken(apiKey);
}
if (!tokenHash) {