Not sure how astro handles middleware and cookies on the server side but SK's hook system is very powerful and intuitive.
Reply on news.ycombinator.com