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

[Bug]: vonage cli failed generate jwt token with the parameter "exp" #124

Open
gcp91020 opened this issue Jan 31, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@gcp91020
Copy link

Node Version

20.x

Platform

Mac (Apple Silcon)

CLI Version

@vonage/cli/1.2.4 darwin-arm64 node-v20.11.0

Command

vonage jwt --key_file=private.key --app_id=12345678 --exp=1706692448

Expected Behavior

With the command, I got the error 'Error:
"exp" should be a number of seconds'

Actual Behavior

It is easy to fix this issue.
in the file
/usr/local/lib/node_modules/@vonage/cli/dist/commands/jwt/index.js
change line 13:
from: exp: flags.exp || Date.now() + 21600,
to: exp: parseInt(flags.exp) || Date.now() + 21600,

@gcp91020 gcp91020 added the bug Something isn't working label Jan 31, 2024
@manchuck
Copy link
Collaborator

manchuck commented Feb 1, 2024

Strange that is needed since we define exp as a number :

I can take a stab at this next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants