feat: enhance canvas functionality with proximity edge handling and improved authentication logging

- Introduced temporary edge styling for proximity connections in the canvas.
- Updated edge synchronization logic to filter out temporary edges during data processing.
- Enhanced authentication logging to provide detailed user identity information when authentication fails.
- Added a new utility function for sanitizing edge handle IDs to ensure compatibility with React Flow.
- Implemented a node handle mapping for proximity connections to streamline edge management.
This commit is contained in:
Matthias
2026-03-26 10:57:10 +01:00
parent 5e99e8cfde
commit 824939307c
5 changed files with 398 additions and 18 deletions

View File

@@ -17,7 +17,12 @@ export async function requireAuth(
): Promise<AuthUser> {
const user = await authComponent.safeGetAuthUser(ctx);
if (!user) {
console.error("[requireAuth] safeGetAuthUser returned null");
const identity = await ctx.auth.getUserIdentity();
console.error("[requireAuth] safeGetAuthUser returned null", {
hasIdentity: Boolean(identity),
identityIssuer: identity?.issuer ?? null,
identitySubject: identity?.subject ?? null,
});
throw new Error("Unauthenticated");
}
const userId = user.userId ?? String(user._id);