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

Usage example? #60

Closed
mikecann opened this issue May 12, 2016 · 4 comments
Closed

Usage example? #60

mikecann opened this issue May 12, 2016 · 4 comments
Labels

Comments

@mikecann
Copy link

Hi,

I have been looking at JWT in my app. I like the look of passport and your library but I think I may be missing some concepts such as how to generate the JWT and how exactly the jwt_payload is populated.

I think what would be super helpful for me and perhaps others would be an end-to-end example from username / password login to getting the token then using that to get some protected api data.

Do you think this would be possible?

Cheers
Mike

@justspamjustin
Copy link

+1 Do you recommend using another library to generate the token such as node-jsonwebtoken. Would you use passport-local to do the initial authentication with the user email and password?

@stephan-nordnes-eriksen

An example of how to use this library would be much appreciated. I too would like to use a simple passport-local signup/login system and add a jwt api to my site, but I am confused as to how to wire everything together.

@1svm
Copy link

1svm commented Jul 26, 2016

This might help you

@mikenicholson
Copy link
Owner

This tutorial is a good place to start.

I don't know the author but glancing through the code example it seems to cover all of the basics.

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

No branches or pull requests

5 participants