Creating logout as next-auth?

Hey, so I was wondering how I could achieve something like next-auth logout/signout?
I have a simple project that just stores a jwt token as a cookie. And I want it to be just like in next-auth, where you log out in one chrome tab, then it automatically logs out in any other open chrome tab.

Could anyone explain to me how they achieve this?
Was this page helpful?