Skip to content

feat: add configurable RS256 asymmetric JWT signing support#933

Open
aliyuHabibu wants to merge 1 commit into
rinafcode:mainfrom
aliyuHabibu:feat/rs256-jwt-support
Open

feat: add configurable RS256 asymmetric JWT signing support#933
aliyuHabibu wants to merge 1 commit into
rinafcode:mainfrom
aliyuHabibu:feat/rs256-jwt-support

Conversation

@aliyuHabibu

Copy link
Copy Markdown
  • Create jwt-config.factory.ts to load PEM keys from env vars or file paths
  • Update AuthModule to use JwtModule.registerAsync with dynamic algorithm detection
  • Update JwtStrategy to use secretOrKeyProvider for runtime key resolution
  • Update AuthService to sign with private key when RS256 is configured
  • HS256 fallback when PEM keys are not set (backward compatible)
  • Add JWT_PRIVATE_KEY and JWT_PUBLIC_KEY env vars with Joi validation
  • Document RS256 key generation and rotation in docs/authentication.md

Closes #836

- Create jwt-config.factory.ts to load PEM keys from env vars or file paths
- Update AuthModule to use JwtModule.registerAsync with dynamic algorithm detection
- Update JwtStrategy to use secretOrKeyProvider for runtime key resolution
- Update AuthService to sign with private key when RS256 is configured
- HS256 fallback when PEM keys are not set (backward compatible)
- Add JWT_PRIVATE_KEY and JWT_PUBLIC_KEY env vars with Joi validation
- Document RS256 key generation and rotation in docs/authentication.md
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@aliyuHabibu Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Great work on this PR
I really appreciate the effort you put into this—everything
kindly fix your workflow

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.

Add configurable JWT algorithm with RS256 support for asymmetric signing

2 participants