fix(api): 🐛 Only send code query parameter when doing OAuth redirects

This commit is contained in:
Jesse Wierzbinski 2024-05-01 18:49:33 -10:00
parent 166048479e
commit 76b29aef9a
No known key found for this signature in database

View file

@ -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