why did Supabase with getClaims() rename user "id" to "sub"?
The
the JWT Claims Reference.
The documented fields like email, phone, user_metadata, app_metadata, and is_anonymous exist at
runtime but aren't typed, making developers lose autocomplete and type safety. I understand why you did it, but it doesn't make it smooth to work with.
getClaims() method returns JwtPayload with type RequiredClaims & { [key: string]: any
}, which doesn't provide TypeScript types for common Supabase JWT fields that are documented inthe JWT Claims Reference.
The documented fields like email, phone, user_metadata, app_metadata, and is_anonymous exist at
runtime but aren't typed, making developers lose autocomplete and type safety. I understand why you did it, but it doesn't make it smooth to work with.