Closed nicholasgubbins closed 1 month ago
Also references #276
closing for me being stupid and not realising the sst upgrade
wasn't actually upgrading my local setup, and instead i needed to run brew upgrade sst
would be nice if the cli could recognise the means of installation, because this is a lil deceiving
Looking at the PR that was recently merged in #191 - the function for handling the lifecycle from /:provider/authorize -> /:provider/callback was changed from:
const callback = c.req.url.replace(/authorize$/, "callback");
toconst callback = c.req.url.replace(/authorize\/.*$/, "callback");
However, given most of the documentation and the standard initial path for the /:provider/authorize will lack a trailing forwardslash, and should be able to forward on query params, this regex is surely incorrect?
/authorize\/.*$/
means match the string "authorize/" including trailing backspace + extraneous further pattern. The replace function will also remove any query params providedI propose we replace this with
const callback = c.req.url.replace.replace(/\/authorize\b/, '/callback');
which will simply replace the substring "/authorize" with "/callback" and leave query params in place - keen to hear thoughts from @antonmoller and @TheKnightCoder who have been working on this recently?