Skip to content

A thin wrapper for fido2-net-lib to improve integration with ASP.NET Identity

License

Notifications You must be signed in to change notification settings

NetDevPack/Fido2.EntityFramework.Store

Repository files navigation

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.

About

A thin wrapper for fido2-net-lib to improve integration with ASP.NET Identity

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages