express-jwt
express-jwt copied to clipboard
README.md does not get you started
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!
+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.
A complete example, including the class data
will help to understand all the scopes
+1
has anyone produced a complete working example yet? If not, would you guys like to work with me to create one?
+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.
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
.