-
Notifications
You must be signed in to change notification settings - Fork 37
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
Setting complete to true in verifier does not return the input #521
Comments
Thanks for reporting! Weird, because according to our tests it seems that setting complete to true does indeed return what is documented. See here. Thoughts? |
Hmm I have to recheck this and make sure I am using the latest version of the package. I'll come back in a short moment |
To me it looks like the decoder returns the input, but the verifier does not. Should it be like that? I was able to verify that your verifier at least does not return the input const sign = createSigner({
key: async () => "secret",
})
const token = sign({ sub: "123" })
const verify = createVerifier({
key: async () => "secret"
complete: true,
})
const sections = verify(token)
// Here the sections does not contain the input property |
So it seems, so you're right that the doc is misleading. |
Great. Thanks for a very very fast reaction and good to have the docs fixed |
🎉 This issue has been resolved in version 5.0.1 🎉 The release is available on: Your optic bot 📦🚀 |
You may want to add the input also into the types. type DecodedJwt = {
header: Record<string, any>
payload: any
signature: string
// input is missing here
} |
🎉 This issue has been resolved in version 5.0.2 🎉 The release is available on: Your optic bot 📦🚀 |
Hi!
First of all thanks for creating a great JWT library.
I wanted to create a new Passport JWT strategy using your JWT library, because the current most used strategy library does not support EdDSA algorithms. When playing around with it, it looks like in contrary what the docs say setting the
complete: true
in verifier settings does not return the original input token. Instead it seems to only return theheader
,payload
andsignature
Also in case you want to check it out, here's the package
https://www.npmjs.com/package/passport-fast-jwt
The text was updated successfully, but these errors were encountered: