I have been looking for a way to do this for some time now and have not found a working solution. Maybe it’s not possible, but I am working with some constraints. Our organization uses Okta (Classic Engine) for user authentication. We want to to use that on a Next.js app I am creating. Our deployment method currently only supports SSG. Is there a way to use Okta to authenticate users to view any page of this Next.js SSG app?
Reading the Next-Auth documentation, it would appear it needs
/api/ routes thus a running SSR. † Furthermore, the Sign in to SPA with embedded Widget documentation shows the use of
react-router-dom which is not needed in Next.js.