Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 928 Bytes

README.MD

File metadata and controls

36 lines (25 loc) · 928 Bytes

Fido2 EntityFramework.Store

A thin wrapper around Fido2 adding store capabilities to it.

Purpouse

Provide a better integration between Fido2 library and ASP.NET Identity

How to implement

  1. Add at Program.cs
builder.Services.AddFido2Context<ApplicationDbContext>();
  1. 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; }
}
  1. Now you can inject IFido2Store to save and recover StoredCredential

Demo

Check demo at Source Code.