dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

IPrincipalAccessor returns same user after another login #224

Closed marcotana closed 4 years ago

marcotana commented 4 years ago

The current user doesn't seem to get updated when the user logs out and another user logs in without refreshing the browser. If I refresh the browser with the new user logged in, then I see the new user's identity. Do I need to do something different to make sure that the user I get from IPrinicpalAccessor (injected in a VM) always returns the current user?

dsuryd commented 4 years ago

Anything that you're doing differently to the example provided by dotnetify-react-template?

If you run that project, you can see the user name below always displays the correct logged in user.

image

image

marcotana commented 4 years ago

I'll investigate further. I am using ASPNETCORE 3 so there may be some middleware issues that I'm having. Anyway, one thing that I did notice that Dotnetify middlewares do not get invoked when the VM is connected using the "Scope" element. I'm not sure if you want me to create a new issue on this. If so, just let me know. I'll close this depending on your answer.

dsuryd commented 4 years ago

Let's create a separate issue for the Scope, and please include steps to reproduce.