In Nextjs how do you set serachParams in middleware ?

currently in my middleware im trying to add a user agent viewport serachParam to requests as seen in the nextjs docs here : https://nextjs.org/docs/app/api-reference/functions/userAgent , however supabase my auth provider also has middleware to validate cookies seen here : https://www.youtube.com/watch?v=v6UvgfSIjQ0, is it possible to merge these two and have a response return with my serachParams
code.png
The userAgent helper extends the Web Request API with additional properties and methods to interact with the user agent object from the request.
Functions: userAgent | Next.js
YouTubeSupabase
Authentication is essential for modern app development! In this video, Jon Meyers configures Supabase Auth to use cookies, and implements OAuth using GitHub in an Email Client, written with the Next.js App Router.

https://supabase.com/docs/guides/auth/social-login/auth-github

The Next.js App Router blurs the lines between Client and Server, th...
The Right Way to do Auth with the Next.js App Router - UPDATED
Was this page helpful?