mikenicholson / passport-jwt

Passport authentication using JSON Web Tokens
MIT License
1.96k stars 213 forks source link

fix(lib/extract_jwt): make http headers lower case when getting auth token #232

Closed b-o-993 closed 2 years ago

b-o-993 commented 2 years ago

This should fix a minor anoyance I was having while debugging an Unauthorized error and it turns out I made a simple stupid mistake when passing a header. If by any chance we pass in an upper case header Authorization on the request object this check won't find the JWT. I admit it may be a bit overkill to convert all headers but it should fix an issue I had while using the package.

Don't know if it should be a specific ES version, hope this is ok and it helps anyone else if they encounter a similar issue 😄

b-o-993 commented 2 years ago

Was an issue with a no longer maintained package that passed the header values as they were to this package, my bad for not checking it earlier