-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hello @alexyakunin,
I'm working on integrating the Fusion library into my Blazor Server project to enable real-time interaction. I have already implemented user login and authentication using Identity.EntityFrameworkCore. However, I'm encountering an issue when injecting the Session service into a Blazor component.
Error:
When I try to inject the Session instance using the following syntax:
@inject Session Session
...
@Session.IdI get the following error message:
System.InvalidOperationException: Property Session is not initialized.
Configuration Code for Fusion Service:
// Fusion services
var fusion= services.AddFusion();
fusion.AddOperationReprocessor();
fusion.AddAuthService<InMemoryAuthService>();
fusion.AddBlazor().AddAuthentication().AddPresenceReporter();
fusion.AddInMemoryKeyValueStore();
fusion.AddService<IUserSessionTracker, UserSessionTracker>();
fusion.AddService<IOnlineUserTracker, OnlineUserTracker>();Project Information:
Framework: Blazor Server
Identity Integration: Identity.EntityFrameworkCore is used for user login and authentication.
Additional Information:
If there are additional configurations or a different approach to session management that I should consider, I would greatly appreciate any advice on implementing this correctly.
Thank you for your assistance!
