Static page cannot load the user info starting from version 2.6.38
Steps to reproduce:
- clone repo https://github.com/Chenalejandro/stackbug
- pnpm dev
- go to localhost:3000, click sign in and then enter the credentials to sign in
Expected: redirected back to the root page, where the user button will be shown Actual: redirect back to the root page, but the sign in button is still there
If we go to localhost:3000/nonstaticpage, we can see the user button because it is a dynamic page. The root page is static.
You can downgrade @stackframe/stack to 2.6.37 and confirm that you can see the user button even in a static page.
This bug happens in both dev and production.
I cannot make the page.tsx a client component (with "use client";) since my component is an async function that fetches some data and statically generate the page with that data.
Update: Using pnpm patch to revert changes from these two commits fixed the issue: https://github.com/stack-auth/stack/commit/02fa7f7dfac4bf38c8083a72dcb0da6cab45001a https://github.com/stack-auth/stack/commit/9f73738d12f3c0acf16a75d48b83be1454a7d00d
This should be fixed in the newest version
I cannot find the pull request that fixes this issue. I tried running the latest version of stack with the reproduction repo, and the issue still exists.