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

Clarifying Questions (and Answers!) :-) #32

Closed
nelsonic opened this issue Apr 14, 2015 · 1 comment
Closed

Clarifying Questions (and Answers!) :-) #32

nelsonic opened this issue Apr 14, 2015 · 1 comment

Comments

@nelsonic
Copy link
Member

We received the following question(s) by email1
replying here in case others have the same questions.

hapi-auth-jwt2-email-questions-1of2
hapi-auth-jwt2-email-questions-2of2

1Email is not the best way to ask questions because others who may have the same questions cannot learn from the answer if its only sent to one person.

@nelsonic
Copy link
Member Author

Yes, you need to have the jsonwebtoken module in your node_modules so that you can sign tokens in your application.
Your validateFunction only validates if the JWT sent by the client is valid, in order to _create_ new JWTs in your application you need to have jsonwebtoken.

npm install jsonwebtoken --save

then you can simply var JWT = require('jsonwebtoken') above your jwtSign method and use it as described in the docs.
If unclear, please see: https://github.com/docdis/learn-json-web-tokens
for an example signing method see our "Real World Example" section in the Readme.

Thanks for the great question! 👍

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

No branches or pull requests

1 participant