quicksln/LiteDB.Identity

Fresh .NET Core 6 project

StrayerJ opened this issue · 3 comments

Is there any documentation/demo on how to get this to work, if possible, with a fresh Core 6 MVC/Razor web project? Things seem to differ a bit from previous versions.

image

I believe the issue is due to the usage of 'IdentityUser' instead of 'LiteDbUser' somewhere in your application. Please begin your inspection from the '_LoginPartial.cshtml' file and make the necessary replacements.

Replace

@inject SignInManager<IdentityUser> SignInManager
@inject UserManager<IdentityUser> UserManager

With

@inject SignInManager<LiteDB.Identity.Models.LiteDbUser> SignInManager
@inject UserManager<LiteDB.Identity.Models.LiteDbUser> UserManager

I’ve also updated project references to the latest LiteDB 5.0.15 and Identity Stores 6.0.13 for .NET 6 on GitHub and released a new Nuget Package https://www.nuget.org/packages/LiteDB.Identity

Or install it :
Install-Package LiteDB.Identity -Version 1.0.6

I have attached an updated configuration for .NET 6 and a sample project below. I hope you find it helpful and that it enables you to quickly start with LiteDB and LiteDB Identity :)

WebApplication1.zip

image

Thank a ton! I'll check it out.