Skip to content

Commit

Permalink
chore: fix iaaa compat oauth redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
thezzisu committed Sep 1, 2024
1 parent 59d928a commit 0864c71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .yarn/versions/9636c323.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
releases:
"@aoi-js/server": patch
8 changes: 4 additions & 4 deletions apps/server/src/routes/oauth/iaaaCompat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export const oauthIaaaCompatRoutes = defineRoutes(async (s) => {
}
},
async (req, rep) => {
const url = new URL('/oauth/authorize', req.originalUrl)
url.searchParams.set('client_id', req.body.appID)
url.searchParams.set('redirect_uri', req.body.redirectUrl)
return rep.redirect(307, url.toString())
const params = new URLSearchParams()
params.set('client_id', req.body.appID)
params.set('redirect_uri', req.body.redirectUrl)
return rep.redirect(302, '/oauth/authorize' + '?' + params.toString())
}
)

Expand Down

0 comments on commit 0864c71

Please sign in to comment.