Update auth.ts

This commit is contained in:
Nicolas
2024-08-30 11:10:48 -03:00
committed by GitHub
parent 636e39d366
commit 52ac132328
+1 -1
View File
@@ -104,7 +104,7 @@ export async function supaAuthenticateUser(
status?: number; status?: number;
plan?: PlanType; plan?: PlanType;
}> { }> {
console.log(req.headers);
const authHeader = req.headers.authorization ?? (req.headers["sec-websocket-protocol"] ? `Bearer ${req.headers["sec-websocket-protocol"]}` : null); const authHeader = req.headers.authorization ?? (req.headers["sec-websocket-protocol"] ? `Bearer ${req.headers["sec-websocket-protocol"]}` : null);
if (!authHeader) { if (!authHeader) {
return { success: false, error: "Unauthorized", status: 401 }; return { success: false, error: "Unauthorized", status: 401 };