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

Base64-encoding option for JWT secrets. #523

Closed
LoicPoullain opened this issue Aug 23, 2019 · 1 comment
Closed

Base64-encoding option for JWT secrets. #523

LoicPoullain opened this issue Aug 23, 2019 · 1 comment

Comments

@LoicPoullain
Copy link
Member

Issue

By default, FoalTS JWT hooks decode JWT secrets using UTF-8. We should have an option to decode these secrets using base64 since foal createsecret generates base64-encoded keys.

Solution

Add a new option in the config to do that.

settings:
  jwt:
    secretEncoding: 'base64'

Implementation

Just add a Buffer.from(secret, 'base64') and a Config.get in the hook.

External link

auth0/node-jsonwebtoken#208 (comment)

@LoicPoullain
Copy link
Member Author

Added in v1.8

@LoicPoullain LoicPoullain moved this to Done / Closed This Release in Issue tracking Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant