The sign-in worked, because /my-account opens, but the header still says "Sign in". In order:
- The page came from the cache. The page cache is read before the platform knows who is asking, and its key ignores cookies. Once an anonymous visitor has requested a URL, everyone gets that copy, members included. Check the response headers:
X-Cache-Status: hitmeans a cached copy. Load the personal part of the header as a fragment, or prevent caching on pages whose output depends on the visitor (member pages and the page cache). - A different hostname. The sign-in cookie,
token, is set for the exact hostname. A member signed in onexample.comis signed out onwww.example.com. Redirect every hostname to one. - The template tests the wrong thing.
isFrontendUser()is also true for a signed-out visitor, because the default type is frontend. TestisLoggedIn(). - The fragment is cached too. A script that fetches the header's personal part must fetch it from a page that is never cached for a member, such as one under
/my-account.