Skip to content

fix: Use jwt types to adjust the implementation slightly#211

Merged
kriszyp merged 2 commits intomainfrom
misc-token-auth-fixes
Mar 12, 2026
Merged

fix: Use jwt types to adjust the implementation slightly#211
kriszyp merged 2 commits intomainfrom
misc-token-auth-fixes

Conversation

@dawsontoth
Copy link
Contributor

The only glaring problem was with algorithms: RSA_ALGORITHM, where it expects an array, on (new) line 204. It's possible the library allows that, but the types don't describe it, so it would work without this fix. But YMMV.

There are some cases where we may get back a string and not a JwtPayload too, but this gets us closer, at least. Plus, there were a lot of unnecessary awaits. The decodes, signs, and verifys are all synchronous.

The only glaring rpbolem was with `algorithms: RSA_ALGORITHM`, where it expects an array, on (new) line 204. There are some cases where we may get back a string and not a JwtPayload too, but this gets us closer, at least. Plus, there were a lot of unnecessary awaits. The decodes, signs, and verifys are all synchronous.
@dawsontoth dawsontoth requested a review from a team as a code owner March 11, 2026 18:00
@socket-security
Copy link

socket-security bot commented Mar 11, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​jsonwebtoken@​9.0.101001007381100
Added@​types/​fs-extra@​11.0.41001007580100

View full report

Copy link
Contributor

@cb1kenobi cb1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@kriszyp kriszyp merged commit 38f677d into main Mar 12, 2026
38 of 40 checks passed
@kriszyp kriszyp deleted the misc-token-auth-fixes branch March 12, 2026 15:07
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.

3 participants