feat(iios): verify real Supabase access tokens (ES256 via JWKS)
SessionVerifier gains a Supabase mode (set SUPABASE_URL): user SATs are ES256, verified against the project's public JWKS — no shared secret. Keys are fetched at startup (onModuleInit) and cached as PEM so verify() stays synchronous; a rotated kid triggers a background refresh. Claims map to MessagePrincipal with userId=email (stable, human-readable → mentions/directory keep working; RealMDM canonicalises later). The legacy HS256 app-token path is unchanged (dev/tests untouched). senderName now prefers the actor display name over the raw handle, so real names show on bubbles when identity is an email. Verified end-to-end against a live project: signup → real ES256 SAT → GET /v1/threads 200 → thread created + owned by the resolved email principal. Full suite 182 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -506,7 +506,7 @@ export class MessageService {
|
||||
id: interaction.id,
|
||||
threadId,
|
||||
senderActorId: interaction.actorId ?? '',
|
||||
senderName: interaction.actor?.sourceHandle?.externalId ?? interaction.actor?.displayName ?? 'unknown',
|
||||
senderName: interaction.actor?.displayName ?? interaction.actor?.sourceHandle?.externalId ?? 'unknown',
|
||||
content: text?.bodyText ?? '',
|
||||
contentRef: file?.contentRef ?? undefined,
|
||||
parentInteractionId: interaction.parentInteractionId ?? undefined,
|
||||
|
||||
Reference in New Issue
Block a user