A thin wrapper around Fido2 adding store capabilities to it.
Provide a better integration between Fido2 library and ASP.NET Identity
- Add at
Program.cs
builder.Services.AddFido2Context<ApplicationDbContext>();
- Change
ApplicationDbContext
using NetDevPack.Fido2.EntityFramework.Store.Model;
using NetDevPack.Fido2.EntityFramework.Store.Store;
public class ApplicationDbContext : IdentityDbContext, IFido2Context
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)
{
}
public DbSet<StoredCredential> Fido2StoredCredential { get; set; }
}
- Now you can inject
IFido2Store
to save and recoverStoredCredential
Check demo at Source Code.