mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28: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({
|
const searchParams = new URLSearchParams({
|
||||||
code: code,
|
code: code,
|
||||||
scope: scope ?? application.scopes,
|
|
||||||
token_type: "Bearer",
|
|
||||||
client_id: client_id,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (state) searchParams.set("state", state);
|
|
||||||
|
|
||||||
return response(null, 302, {
|
return response(null, 302, {
|
||||||
Location: `${redirectUri.origin}${
|
Location: `${redirectUri.origin}${
|
||||||
redirectUri.pathname
|
redirectUri.pathname
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue