mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix(api): 🐛 Only send code query parameter when doing OAuth redirects
This commit is contained in:
parent
166048479e
commit
76b29aef9a
|
|
@ -309,13 +309,8 @@ export default apiRoute<typeof meta, typeof schema>(
|
|||
|
||||
const searchParams = new URLSearchParams({
|
||||
code: code,
|
||||
scope: scope ?? application.scopes,
|
||||
token_type: "Bearer",
|
||||
client_id: client_id,
|
||||
});
|
||||
|
||||
if (state) searchParams.set("state", state);
|
||||
|
||||
return response(null, 302, {
|
||||
Location: `${redirectUri.origin}${
|
||||
redirectUri.pathname
|
||||
|
|
|
|||
Loading…
Reference in a new issue