Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.48 KB

README.md

File metadata and controls

56 lines (42 loc) · 1.48 KB

MongoFlow.Identity

License: MIT .NET C# NuGet

Warning

This package is not ready for production use. It is still in development and should not be used in a production environment.

We welcome your feedback! You can reach us by opening a GitHub issue.

A MongoDB provider for ASP.NET Core Identity that leverages MongoFlow for seamless integration.

Installation

dotnet add package MongoFlow.Identity

Usage

You can call AddMongoFlowStores<TVault> on IdentityBuilder to configure the MongoDB stores. For example:

services.AddIdentityCore<MongoUser>()
            .AddRoles<MongoRole>()
            .AddMongoFlowStores<MyVault>();

You can customize MongoUser and MongoRole by inheriting.

public class MyUser : MongoUser
{
    public string MyProperty { get; set; }
}

public class MyRole : MongoRole
{
    public string MyProperty { get; set; }
}

or with custom key

public class MyUser : MongoUser<Guid>
{
    public string MyProperty { get; set; }
}

public class MyRole : MongoRole<Guid>
{
    public string MyProperty { get; set; }
}