ASP.NET Core Data Protection key persistence using Marten. Useful for projects already using Marten that want to store data protection keys in the same PostgreSQL database.
dotnet add package Interflare.DataProtection.MartenCall PersistKeysToMarten() when configuring data protection. It merges with your existing Marten configuration.
services.AddMarten(/* ... */);
services.AddDataProtection()
.PersistKeysToMarten();Keys are stored as DataProtectionKey documents in your Marten document store. The schema is created automatically when Marten runs its migrations.
- .NET 8, 9, or 10
- Marten 8.x
MIT