Open TheKnightCoder opened 7 months ago
https://github.com/sst/ion/blob/72fab0f5805e09c673cf781a4e5e2dc24fbd4750/sdk/js/src/auth/handler.ts#L226C3-L226C35
The /token endpoint should be POST not GET as it has body form data
/token
POST
GET
Also if (payload.client_id !== form.get("client_id")) { will fail because in app.use("/:provider/authorize", client_id is not added to the options.cookie
if (payload.client_id !== form.get("client_id")) {
app.use("/:provider/authorize",
options.cookie
this is correct - do you mind making a PR for this? no worries if you're busy i can look at it when we launch auth officially (next few weeks)
yep PR is here sst/ion#310
https://github.com/sst/ion/blob/72fab0f5805e09c673cf781a4e5e2dc24fbd4750/sdk/js/src/auth/handler.ts#L226C3-L226C35
The
/token
endpoint should bePOST
notGET
as it has body form dataAlso
if (payload.client_id !== form.get("client_id")) {
will fail because inapp.use("/:provider/authorize",
client_id is not added to theoptions.cookie