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

I get .sign is not defined #67

Closed
ralyodio opened this issue Jan 16, 2017 · 4 comments
Closed

I get .sign is not defined #67

ralyodio opened this issue Jan 16, 2017 · 4 comments

Comments

@ralyodio
Copy link

ralyodio commented Jan 16, 2017

I get sign is not defined error when doing (v2)

npm install koa-jwt@v2

const jwt = require('koa-jwt');
jwt.sign({ role: 'user' }, 'A very secret key')
@ralyodio
Copy link
Author

looks like the v2 branch doesn't have the new exports of .sign and .verify from v1

@sdd
Copy link
Collaborator

sdd commented Jan 19, 2017

The jsonwebtoken methods are no longer exported in the v2 branch.

See here: #32 (comment)

Closing this issue.

@sdd sdd closed this as completed Jan 19, 2017
@anthonyettinger
Copy link

That's fine but can you at least update the docs. I spent 2 days figuring out why the examples didn't work on v2.

@sdd
Copy link
Collaborator

sdd commented Jan 21, 2017

Point taken, will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants