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

Fails to verify with complete: true option if there is no footer. #33

Closed
2 tasks done
ksmithut opened this issue Sep 11, 2022 · 1 comment
Closed
2 tasks done
Labels

Comments

@ksmithut
Copy link

What happened?

When trying to extract the footer information from a token that has no footer, the verify call returns a rejected promise.

Version

3.1.0

Node.js Version

v18.9.0

Code to reproduce

import { V4 } from 'paseto'

const key = await V4.generateKey('public', { format: 'paserk' })
const token = await V4.sign({}, key.secretKey)
// This next line fails
const payload = await V4.verify(token, key.publicKey, {
  complete: true
})

Required

  • I have searched the issues tracker and discussions for similar topics and couldn't find anything related.
  • I agree to follow this project's Code of Conduct
@panva
Copy link
Owner

panva commented Sep 12, 2022

@ksmithut thank you for this report. v3.1.1 was released with a fix.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants