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.26k stars 518 forks source link

Logged in user keeps reporting for John, even though other users are logged in. #284

Closed wimmatthijs closed 3 years ago

wimmatthijs commented 3 years ago

Describe the bug Logged in user keeps reporting for John. I added an extra user and removed the pre-installed admin-user to see if it would change. But unfortunately it's not the case. Seems hard-coded, better is to keep the logged in user in session storage or in some user-object somewhere? Didn't check dev branch yet to know either it was fixed or not...

Screenshots image image

wimmatthijs commented 3 years ago

I did a small workaround by using the @User.Identification.Name but this is the e-mail adres.... It seems that you guys are fecthing the "author" object to fill in that information on the other pages, but this is not reachable from the main blogifier project? I tried to inject the code used to fill up the author but no luck.... I'll have to study the project a bit more in order to figure out how to do it

image

wimmatthijs commented 3 years ago

OK, getting to know blazor a bit better now. So the Blog itself is Blazor Server application and the Admin Panel is a Blazor Client (Webassembly) application. Maybe it would be good to point that out somewhere in the docs since both applications are a bit different.

Fixed the bug by injecting IAuthorProvider into the nav.cshtml view.

image

image