Maybe I should have labeled it as API authentication and not server-side.
The reason I did not include it is that I felt the redirect was more than enough.
Performing a redirect on the server is not fully supported by Next.js causing a total reload since it is not using Next.js's router.
Songs Le
There's no server side auth present in this article btw. The one you mentioned at the last is only for validating apis. So, auth on nextjs pages still rendered on client side. Only solution as given by firebase auth is to use service-worker or to create cookies. Btw, very good article. It's a clean code.