The above should work when header is set as 'Bearer', but passport-jwt returns a 401. Required to use ExtractJwt.fromHeader('bearer'); for it to work. This should be case insensitive as headers are.
It's common practice for headers to start with a capital letter. I had that code above wondering why it wouldn't work, this fixed it, could be documented instead but I also saw people on stack overflow wondering why Bearer wouldn't work with fromHeader.
The above should work when header is set as 'Bearer', but passport-jwt returns a 401. Required to use
ExtractJwt.fromHeader('bearer');
for it to work. This should be case insensitive as headers are.It's common practice for headers to start with a capital letter. I had that code above wondering why it wouldn't work, this fixed it, could be documented instead but I also saw people on stack overflow wondering why Bearer wouldn't work with fromHeader.