express-jwt icon indicating copy to clipboard operation
express-jwt copied to clipboard

README.md does not get you started

Open ajbraus opened this issue 8 years ago • 5 comments

Hi there, the README is very hard to parse out exactly how to use express-jwt. Since this is a relatively new technology, why not simplify exactly how someone can login/register using it? Maybe a sample app?

If I get things sorted out myself I'll circle back around and do a PR, but no promises.

Thanks!

ajbraus avatar Jan 02 '17 21:01 ajbraus

+1, I get how to implement the package on the server, but there are no examples of how the jwt should be attached to the incoming request. (I am using Authorization: Bearer {jwt} header but am getting a jwt malformed error. An example of a valid request would be super helpful.

chriswhong avatar Jan 24 '17 18:01 chriswhong

A complete example, including the class data will help to understand all the scopes

gonrial avatar Feb 06 '17 16:02 gonrial

+1

has anyone produced a complete working example yet? If not, would you guys like to work with me to create one?

psotos avatar Feb 15 '17 14:02 psotos

+1. How does one actually create the JWT when a login occurs? What should the subject be? how is it translated back to a req.user? So many questions. :)

@psotos I'd be happy to help, but I don't have it working yet.

SuperTango avatar Mar 09 '17 06:03 SuperTango

As best I can tell, it looks like express-jwt is just for validating incoming jwt's ("validates JsonWebTokens and sets req.user"), and that other parts of the process, like creating jwt's, fall to other modules like jsonwebtoken or jwt-express.

willxy avatar Mar 10 '17 18:03 willxy