-
-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(jwt): Support custom secret keys for signing JWTs #3546
feat(jwt): Support custom secret keys for signing JWTs #3546
Conversation
- Expanded key type check to include 'secret' for JWT signing. This aligns importPrivateKey method with importPublicKey method for handling "secret" type keys. - Added a test case to sign, verify, and decode using a custom secret, ensuring the correct flow and error handling with mismatched keys.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3546 +/- ##
==========================================
- Coverage 94.29% 94.27% -0.02%
==========================================
Files 157 157
Lines 9499 9501 +2
Branches 2761 2744 -17
==========================================
Hits 8957 8957
- Misses 542 544 +2 ☔ View full report in Codecov by Sentry. |
Hi @kaandok Nice PR! One thing I've left it as a comment. |
Updated, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@kaandok Thank you for the quick fix. Merging now! |
* Support custom secret keys for signing JWTs - Expanded key type check to include 'secret' for JWT signing. This aligns importPrivateKey method with importPublicKey method for handling "secret" type keys. - Added a test case to sign, verify, and decode using a custom secret, ensuring the correct flow and error handling with mismatched keys. * update comment for rejected private key imports
Expanded key type check to include 'secret' for JWT signing. This aligns importPrivateKey method with importPublicKey method for handling "secret" type keys.
Added a test case to sign, verify, and decode using a custom secret, ensuring the correct flow and error handling with mismatched keys.
The author should do the following, if applicable
bun run format:fix && bun run lint:fix
to format the code