Skip to content

Use canonical role casing for login tokens#3340

Open
LikeACloud7 wants to merge 1 commit into
SecureBananaLabs:mainfrom
LikeACloud7:codex/login-token-role-casing-743
Open

Use canonical role casing for login tokens#3340
LikeACloud7 wants to merge 1 commit into
SecureBananaLabs:mainfrom
LikeACloud7:codex/login-token-role-casing-743

Conversation

@LikeACloud7
Copy link
Copy Markdown

/claim #743

Closes #3338

Summary

  • Sign stubbed login access tokens with the canonical CLIENT role claim used by the Prisma UserRole enum.
  • Add a focused service regression test that decodes the JWT and verifies the login token subject and role claim.

Validation

  • node --check apps/api/src/services/authService.js
  • node --check apps/api/src/tests/authService.test.js
  • node --test apps/api/src/tests/authService.test.js
  • node --test apps/api/src/tests/*.test.js
  • git diff --check

Demo evidence: the focused Node test exercises the login flow, decodes the issued JWT, and verifies the canonical role claim.

AI assistance disclosure: this PR was prepared with Codex assistance and manually scoped to the login-token role casing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Login tokens should use canonical UserRole casing

1 participant