My App is a blazor server app, buiid with the servicestack template.
I want to get the user data in a service.
I can’t find the reason why this doesn’t works:
With getSession() I can’t get any data like login user, etc.
[Authenticate]
public class ObjektListServices : Service
{
public object Get(GetObject4Gridview request)
{
var userId = this.GetSession().UserAuthId;
...
}
}
The value for userid is null, although I have a login user.
public class MyServices : Service
{
public object Any(Hello request)
{
var userId = this.GetSession().UserAuthId;
return new HelloResponse { Result = $"Hello, {request.Name}!" };
}
}