blogifierdotnet / Blogifier

Blogifier is an open-source publishing platform Written in ASP.NET and Blazor WebAssembly. With Blogifier make a personal blog or a website.
https://blogifier.net
MIT License
1.28k stars 518 forks source link

Author is null on demo site when switching between themes. #189

Closed jwmxyz closed 4 years ago

jwmxyz commented 4 years ago

Steps to reproduce:

Cause:

Inside of Profile.Razor.cs Author is null:

 public async Task Load()
 {
        var authState = await AuthenticationStateTask;
         Author = await DataService.Authors.GetItem(
              a => a.AppUserName == authState.User.Identity.Name);
          PwdModel = new ChangePasswordModel {
                UserName = authState.User.Identity.Name
          };
 }

Fix

rxtur commented 4 years ago

Thanks for pointing this out, it should redirect to login screen now as expected.