Couple feature requests
See original GitHub issueFirst off thank you so much for this library. You just single handedly shaved nearly 1MB off my build now that I can toss jsonwebtoken
.
- Option for outputting the payload during verify
try {
await JWT.verify(authToken, JWT_TOKEN)
jwt = await JWT.decode(authToken)
} catch(err) {
throw {status: 401, message: `Invalid or expired authorization token`}
}
INTO
try {
jwt = await JWT.verify(authToken, JWT_TOKEN)
} catch(err) {
throw {status: 401, message: `Invalid or expired authorization token`}
}
-
Validate
exp
keys during verify -
Support for Buffer secrets
JWT.verify(authToken, Buffer.from(JWT_TOKEN, 'base64'))
- Support for es6 import destructuring syntax
import { verify } from '@tsndr/cloudflare-worker-jwt'
- If you’re feeling really ambitions support verifying complex JWSs like what is being sent back from the Android safetynet attestation. https://developer.android.com/training/safetynet/attestation 😬
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Managing feature requests: A comprehensive guide - UserVoice
Feature requests are precious opportunities to better serve your users' ... Here are a couple of key communication points to follow up with...
Read more >A couple of feature requests. - Google Groups
1. Arbitrary HTTP requests. 2. Content-type handlers. 3. Protocol handlers. ... anticipate their addition). ... be able to make HTTP requests.* JSONP isn't...
Read more >Feature Requests: How to Collect Them and Engage Users in ...
Feature requests are an important window into your customers desires and priorities. Here's how to make the most of them, and handle the ......
Read more >A couple of feature requests for a great theme! - WordPress.org
A couple of feature requests for a great theme! ... Current: The background overlay image span full screen from left to right. However...
Read more >A couple feature requests - Veeam R&D Forums
Veeam Community discussions and solutions for: A couple feature requests of PowerShell. ... Some selfish requests for PowerShell.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No worries man. This project is only loosely inspired by the
jsonwebtoken
library and I’m not the biggest fan of using exceptions unless something really breaks to be honest, although this is a personal preference. To me anif
is cleaner than atry
-catch
.Oh you meant
expiry
, see I’m stupid too 😅. Obviously, this is something I should absolutely add and a huge oversight on my part. This goes right to the top of my TODO list and I’ll try to add it.Maybe I should add it. Options are good, right? 🤔
While I’m already in there, I might add it as well.
Thank you for the workaround, even though it shouldn’t be necessary anymore once I finished my work on
2.
.Since we’ve sorted everything out in discord I’m gonna go ahead and close this issue 😃