You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
verifyPassword currently only accepts get. Most of the endpoints have been moved to accept POST, but not this one. When using GET with verifyPassword, it sends the username and password being verified allowing this data to be cached.
Use POST instead and SDK's should change to POST. I currently only found this being used in the JS SDK, though I have an implementation of it for the Swift SDK that I haven't merged yet. I don't plan on merging the Swift version with GET. Of course, it can also be accessed via REST.
Maybe get rid of GET here? Maybe it's needed for backwards compatibility? Just a thought...
Example Use Case
User is logged in
User attempts to verify their password. Hit the verifyPassword endpoint with a POST (instead of GET)
Mixed up the endpoints in my previous comment, verifyPassword is not changing anything on the backend side, it's an idempotent operation, which speaks for GET. However, the HTTP specs allow to use POST for idempotent ops if there is a good reason, which I think is given considering that we don't want sensitive info in logs.
This almost contradictory spec of RFC2616 / HTTP/1.1 which implies that an idempotent request has to expose parameters as part of the URL due to lack of a request body is slowly softening up. RFC 7230-7237 (2014) does not explicitly demand that the request body of a GET request should be ignored. This opens up the possibility to add a body to a GET request. However, we may run into compatibility issues on systems where the request is parsed in a "conservative" way and any body of a GET request being discarded.
So for the time being, switching to POST seems to be the way to go.
Just noting that this is already implemented - POST on verifyPassword landed via #8895. The route is registered at UsersRouter.js:860 (right alongside the existing GET), reusing the same handleVerifyPassword handler, and _authenticateUserFromRequest already reads req.body first with a req.query fallback.
The POST + JSON body path is covered by tests too, e.g. spec/VerifyUserPassword.spec.js:609 and :649, plus the GET/POST cases in spec/vulnerabilities.spec.js. So REST clients and SDKs can use POST today and keep credentials out of the query string.
The only leftover bits from the original ask - dropping GET entirely and switching the SDKs to POST - are either a breaking change we'd want to keep for backwards compat, or live in the SDK repos rather than here.
Activity
parse-github-assistant commentedon Jan 24, 2022
Thanks for opening this issue!
mtrezza commentedon Jan 24, 2022
I also think it should be POST because:
the request changes something on the backend, so according to http spec it should not be GETmtrezza commentedon Jan 24, 2022
Mixed up the endpoints in my previous comment,
verifyPasswordis not changing anything on the backend side, it's an idempotent operation, which speaks forGET. However, the HTTP specs allow to use POST for idempotent ops if there is a good reason, which I think is given considering that we don't want sensitive info in logs.This almost contradictory spec of RFC2616 / HTTP/1.1 which implies that an idempotent request has to expose parameters as part of the URL due to lack of a request body is slowly softening up. RFC 7230-7237 (2014) does not explicitly demand that the request body of a GET request should be ignored. This opens up the possibility to add a body to a GET request. However, we may run into compatibility issues on systems where the request is parsed in a "conservative" way and any body of a GET request being discarded.
So for the time being, switching to POST seems to be the way to go.
dblythy commentedon Jul 5, 2026
Just noting that this is already implemented - POST on
verifyPasswordlanded via #8895. The route is registered atUsersRouter.js:860(right alongside the existing GET), reusing the samehandleVerifyPasswordhandler, and_authenticateUserFromRequestalready readsreq.bodyfirst with areq.queryfallback.The POST + JSON body path is covered by tests too, e.g.
spec/VerifyUserPassword.spec.js:609and:649, plus the GET/POST cases inspec/vulnerabilities.spec.js. So REST clients and SDKs can use POST today and keep credentials out of the query string.The only leftover bits from the original ask - dropping GET entirely and switching the SDKs to POST - are either a breaking change we'd want to keep for backwards compat, or live in the SDK repos rather than here.