Skip to content
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

Fix jwt algorithm #2104

Merged
merged 3 commits into from
Nov 8, 2024
Merged

Fix jwt algorithm #2104

merged 3 commits into from
Nov 8, 2024

Conversation

PooyaRaki
Copy link
Contributor

@PooyaRaki PooyaRaki commented Nov 7, 2024

Summary

This PR fixes an issue where the JWT algorithm was incorrectly passed in the payload when signing and decoding. The algorithm is now correctly placed in the third parameter as an option, ensuring proper signing/decoding of tokens with the desired algorithms.

Changes

  • Moved the JWT algorithm from the payload to the options parameter in the sign/verify/decode method
  • Verified that tokens are now signed/verified/decoded and validated with the specified algorithm

@PooyaRaki PooyaRaki marked this pull request as ready for review November 7, 2024 16:33
@PooyaRaki PooyaRaki requested a review from a team as a code owner November 7, 2024 16:33
src/datasources/jwt/jwt.module.ts Show resolved Hide resolved
src/datasources/jwt/jwt.module.ts Outdated Show resolved Hide resolved
@PooyaRaki PooyaRaki requested a review from iamacook November 7, 2024 17:11
@PooyaRaki PooyaRaki self-assigned this Nov 7, 2024
@PooyaRaki PooyaRaki enabled auto-merge (squash) November 8, 2024 10:50
@PooyaRaki PooyaRaki merged commit f666253 into main Nov 8, 2024
20 checks passed
@PooyaRaki PooyaRaki deleted the jwtAlgorithm branch November 8, 2024 10:52
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.

2 participants