{"id":22345909,"url":"https://github.com/youssefsell/identityserver4.mongodb","last_synced_at":"2026-05-03T11:36:03.125Z","repository":{"id":119701706,"uuid":"383890388","full_name":"YoussefSell/IdentityServer4.MongoDB","owner":"YoussefSell","description":"IdentityServer4.MongoDB is a package that provides the Storage implementation on top of the MongoDB database driver to add data persistence for IdentityServer.","archived":false,"fork":false,"pushed_at":"2021-07-19T22:08:06.000Z","size":1299,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T11:49:47.162Z","etag":null,"topics":["csharp","dotnet","dotnet-core","identityserver4","mongodb"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YoussefSell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-07T18:24:45.000Z","updated_at":"2024-04-15T21:50:47.000Z","dependencies_parsed_at":"2023-06-09T09:00:37.058Z","dependency_job_id":null,"html_url":"https://github.com/YoussefSell/IdentityServer4.MongoDB","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoussefSell%2FIdentityServer4.MongoDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoussefSell%2FIdentityServer4.MongoDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoussefSell%2FIdentityServer4.MongoDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoussefSell%2FIdentityServer4.MongoDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YoussefSell","download_url":"https://codeload.github.com/YoussefSell/IdentityServer4.MongoDB/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245633080,"owners_count":20647336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","dotnet-core","identityserver4","mongodb"],"created_at":"2024-12-04T09:19:11.011Z","updated_at":"2026-05-03T11:36:03.066Z","avatar_url":"https://github.com/YoussefSell.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IdentityServer4.MongoDB\n\nIdentityServer4.MongoDB is a package that provides the Storage implementation on top of MongoDB database driver to add data persistence for IdentityServer.\n\n## Quick setup\n\nto get started install the package using the Nuget package manager `Install-Package YoussefSell.IdentityServer4.MongoDB`.\n\nthen add the following configuration to your IdentityServer4 registration:\n\n```csharp\npublic void ConfigureServices()\n{\n    // ... other code\n\n    const string connectionString = @\"mongodb://localhost:27017\";\n    const string databaseName = \"IdentityServer\";\n\n    services.AddIdentityServer()\n        .AddTestUsers(TestUsers.Users)\n        .AddDeveloperSigningCredential()\n        // add the configuration store\n        .AddConfigurationStore(databaseName, connectionString)\n        // add the operational store\n        .AddOperationalStore(databaseName, connectionString);\n\n    // ... other code\n}\n```\n\nboth methods have an overload that takes an action to configure your database and collections.\n\nyou can also find a quick starter template ([here](https://github.com/YoussefSell/IdentityServer4.MongoDB/tree/master/samples/Quickstarts)) that you can leverage to spin a new project.\n\nthe 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.\n\na more detailed configuration can be found on this blog post ([Using MongoDB as a data store for IdentityServer4](https://youssefsellami.com/using-mongodb-with-identityserver4))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoussefsell%2Fidentityserver4.mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoussefsell%2Fidentityserver4.mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoussefsell%2Fidentityserver4.mongodb/lists"}