UserAuthId is null on AuthUserSession

Hi,
On one of my project i have inherited from IUserAuth instead of the default UserAuth.
But with this change on a CustomUserSession if you override OnAuthenticatedAsync session.UserAuthId becomes null.
I’m missing something? should be doing something my side?

Here a small repro

thanks

Your Id Primary Key needs to be AutoIncremented:

public class AppUser : IUserAuth
{
    [AutoIncrement]
    public int Id { get; set; }
    //....
}
1 Like