Replies: 2 comments 4 replies
-
@panva Do you have any thoughts on this one? I'm happy to submit a PR, since I'm probably going to fork this, add |
Beta Was this translation helpful? Give feedback.
-
I cannot imagine a scenario where a proper user-agent redirect would trigger a HEAD request. I suggest you dig deeper to find out why that's happening before entertaining this in a fork. |
Beta Was this translation helpful? Give feedback.
-
I've been seeing the occasional HTTP 500 response sent from my Passport+OIDC-protected web app, and looking into it, they're all HTTP HEAD requests to my /login route, which is the route that is backed by a
passport.authenticate
call to my OIDC strategy. The HTTP 500 is returned when the strategy hits line 332 ofclient.js
, and theswitch
doesn't have acase
for an HTTP HEAD method. But in delving into both the expectations of how servers handle HTTP HEAD requests, and what the strategy is really doing, there shouldn't be any problem for the strategy just handling a HEAD the same way it handles GET requests — e.g., just replacing lines 333-334 inBaseClient.callbackParams
:with
I'm happy to submit a PR for this, if folks think it's reasonable — it really does meet the expectations for how the Passport strategy would respond to HEAD requests, and prevents the HTTP 500 internal server errors that shouldn't be happening.
Beta Was this translation helpful? Give feedback.
All reactions