Skip to content

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

License

Notifications You must be signed in to change notification settings

InsurUp/MongoFlow.Identity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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; }
}