SessionId is not added to requests

i have enabled to auth using NetCoreIdentityAuthProvider as follows

       private IPlugin CreateAuthFeature() =>
            new AuthFeature(SessionFactory,
                new IAuthProvider[] {CreateNetCoreIdentityAuthProvider()});

        private IAuthSession SessionFactory() => new MyIdentityServerSession();

        /// <summary>
        /// Adapter to enable ASP.NET Core Identity Auth in ServiceStack
        /// </summary>
        private NetCoreIdentityAuthProvider CreateNetCoreIdentityAuthProvider() =>
            new NetCoreIdentityAuthProvider(AppSettings) {PopulateSessionFilter = PopulateSessionFilter};

But when i add the [Authorize] attribute to a service i get the hasSession to be null in the ServiceStack.Auth.AuthProviderExtensions

 internal static bool PopulateFromRequestIfHasSessionId(this IRequest req, object requestDto)
            var hasSession = requestDto as IHasSessionId;
            if (hasSession?.SessionId != null)
                return true;
            return false;

For information i’m authenticated and have a correct JWT token sent in the header.

What am I missing?

Hi trying to reproduce your issue, can you share your implementation you are assigning to PopulateSessionFilter?

Do you mean the built in [Authenticate] attribute or your own [Authorize] attribute implementation?

I can’t see the JwtAuthProvider being registered in the AuthProviders code you have shared. How are you handling your JWT token to authenticate the client?