redirect on edge should clear query params #117
-
I have a middleware function that does a Example this: https://authedge.vercel.app/?foo=bar this: http://localhost:3000/?foo=bar Here is the source: The problem I have now is that after an oauth2 callback I do a redirect. That should clear the query params, but now I get something like this: |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 3 replies
-
I got the same problem with a normal redirect (not using NextResponse): return new Response(null, {
status: 302,
headers: {
location: "https://authedge.vercel.app/dashboard",
},
}); Not sure how it should work now, but local dev behaves different than when deployed. Maybe create an issue? |
Beta Was this translation helpful? Give feedback.
-
Solution: override the query params: NextResponse.redirect("/dashboard?scope=&state=&code="); |
Beta Was this translation helpful? Give feedback.
Solution: override the query params: