getSession() returns NULL in Next.JS Server Action

Just deployed to production and log-in works just fine. Tokens are solid, even have the Roles I added in a post-login action. However whenever I call getAccessToken it says there is no valid session. So I do a getSession() and it returns null.

Just using @auth0/nextjs-auth0 straight up. Ideas where to go from here?

Small update. It now works “sometimes”… :man_shrugging:

Can’t figure out what the cause of it working, and then not working just seconds later.

I ended up putting withPageAuthRequired on this page, which ends up putting me through the login process with each refresh, and then lands me back on the page. Queries are run to populate the page just fine. However, when I call the server action that filters the results on the page, I get an error telling me there is no valid session.