refactor(web): enhance redirect response in callback route

This commit is contained in:
Anish Sarkar 2026-06-16 21:00:53 +05:30
parent c3a96aa532
commit 55c2e5c0d8

View file

@ -16,8 +16,11 @@ export async function GET(
};
const result = JSON.stringify(payload);
const response = NextResponse.redirect(`/dashboard/${search_space_id}/new-chat`, {
const response = new NextResponse(null, {
status: 302,
headers: {
Location: `/dashboard/${search_space_id}/new-chat`,
},
});
response.cookies.set(OAUTH_RESULT_COOKIE, result, {
path: "/",