jaredhanson / passport-oauth2

OAuth 2.0 authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-oauth2/?utm_source=github&utm_medium=referral&utm_campaign=passport-oauth2&utm_content=about
MIT License
607 stars 343 forks source link

Pass HTTP status code to TokenError #131

Open getsnoopy opened 4 years ago

getsnoopy commented 4 years ago

Previously, when generating error responses, TokenError was not passed the HTTP status code that was passed to the error response handler (parseErrorResponse). This resulted in every kind of error being treated as a 500 Internal Server Error. This commit fixes this by passing on the returned status code from the OAuth call.

Fixes #127

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 86692c124bf75acdb8c6a89e98edcc3168084925 on getsnoopy:pass-tokenerror-status into e20f26aad60ed54f0e7952928cbb64979ef8da2b on jaredhanson:master.

getsnoopy commented 3 years ago

@jaredhanson This has been open for a while; could you take a look?