YoussefSell.IdentityServer4.MongoDB 4.1.2

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package YoussefSell.IdentityServer4.MongoDB --version 4.1.2
NuGet\Install-Package YoussefSell.IdentityServer4.MongoDB -Version 4.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YoussefSell.IdentityServer4.MongoDB" Version="4.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YoussefSell.IdentityServer4.MongoDB --version 4.1.2
#r "nuget: YoussefSell.IdentityServer4.MongoDB, 4.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install YoussefSell.IdentityServer4.MongoDB as a Cake Addin
#addin nuget:?package=YoussefSell.IdentityServer4.MongoDB&version=4.1.2

// Install YoussefSell.IdentityServer4.MongoDB as a Cake Tool
#tool nuget:?package=YoussefSell.IdentityServer4.MongoDB&version=4.1.2

IdentityServer4.MongoDB

IdentityServer4.MongoDB is a package that provides the Storage implementation on top of MongoDB database driver to add data persistence for IdentityServer.

Quick setup

to get started install the package using the Nuget package manager Install-Package YoussefSell.IdentityServer4.MongoDB.

then add the following configuration to your IdentityServer4 registration:

public void ConfigureServices()
{
    // ... other code

    const string connectionString = @"mongodb://localhost:27017";
    const string databaseName = "IdentityServer";

    services.AddIdentityServer()
        .AddTestUsers(TestUsers.Users)
        .AddDeveloperSigningCredential()
        // add the configuration store
        .AddConfigurationStore(databaseName, connectionString)
        // add the operational store
        .AddOperationalStore(databaseName, connectionString);

    // ... other code
}

both methods have an overload that takes an action to configure your database and collections.

you can also find a quick starter template (here) that you can leverage to spin a new project.

the project has been built using the same concepts found in the EF core implementation of IdentityServer storage. this why you will find the same configuration if you already used EF core.

a more detailed configuration can be found on this blog post (Using MongoDB as a data store for IdentityServer4)

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated