Hi @gautelorentsen,
Welcome back to the Auth0 Community and sorry for the late reply.
In NextJs the appSession cookie is still valid after a successful logout since this app session cookie is stateless. This is the expected behavior and there is no built in handler for this use-case in the Next.js SDK, however silent authentication can be configured. Please check out the guidelines from our Knowledge Article on how to sync sessions with Auth0 when using the NextJS SDK.
I would also definitely recommend having a look over this community post for more details and solutions regarding your issue.
I hope this helped.
Thanks,
Remus