Remove redundant id field from JWT payloads

Drop the duplicated `id` alias from JWT payloads and related token generation across auth providers and endpoints. The TokenPayload interface no longer includes `id`; middleware now derives `user.id` from `sub` when attaching the authenticated user to requests. Update tests accordingly. This reduces redundancy and ensures the canonical user identifier is `sub`.
This commit is contained in:
kikootwo
2026-03-04 15:36:28 -05:00
parent a50fbc721e
commit 95917715b1
11 changed files with 3 additions and 15 deletions
@@ -167,7 +167,6 @@ export async function POST(request: NextRequest) {
// Generate JWT tokens
const accessToken = generateAccessToken({
sub: user.id,
id: user.id,
plexId: user.plexId,
username: user.plexUsername,
role: user.role,