Skip to content

fix(auth): sign refresh token with uppercase CLIENT UserRole casing#3336

Open
git67-aaa wants to merge 1 commit into
SecureBananaLabs:mainfrom
git67-aaa:issue-3335
Open

fix(auth): sign refresh token with uppercase CLIENT UserRole casing#3336
git67-aaa wants to merge 1 commit into
SecureBananaLabs:mainfrom
git67-aaa:issue-3335

Conversation

@git67-aaa
Copy link
Copy Markdown

Closes #3335

This pull request updates the refreshToken() function in authService.js to sign the refreshed access token with the canonical uppercase CLIENT role claim instead of the lowercase client string. This aligns the JWT claims with the canonical UserRole enum values from the database domain schema.

We also added a native Node.js test in apps/api/src/tests/auth.test.js to verify the casing of the role claim in the refreshed token.

github-actions Bot added a commit that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refresh tokens should use canonical UserRole casing

1 participant