Getting Currently Logged In Umbraco Member from Mi...
# help-with-umbraco
t
Trying to do a protected media library and the membermanger.getcurrentmemberasync() method is always null. Is there a way to get the middleware in a place that would have that information? Thank You!
h
That should work, what version of Umbraco are you on?
where are you registering your middleware? it should come after app.UseAuthentication(); app.ProtectedMediaHandler();
Copy code
cs
    public static IApplicationBuilder ProtectedMediaHandler(this IApplicationBuilder builder)
    {
        return builder.UseMiddleware<ProtectedMediaHandlerMiddleware>();
    }
t
Version 10. I'll check but I don't think we have UseAuthentication currently.
2 Views