We have a scenario when SecurityToken.IsAnonymousUser is set to true when a user is logged in and visiting the category page, how can this be possible?
It is set to false in the same session for other pages.
I see no difference when debugging Thread.CurrentPrincipal.Identity
Hi, I had a similar issue in a project. The issue was that PageModelBuilder was registred as a singleton, which caused the injected security context to be “Captive dependency” in that singleton.
[Service(Lifetime = DependencyLifetime.Singleton)]
public abstract class PageModelBuilder<T> : IViewModelBuilder<T>
Should be just
public abstract class PageModelBuilder : IViewModelBuilder