{"id":22830788,"url":"https://github.com/mguinness/identitymanagerblazor","last_synced_at":"2025-04-23T19:13:11.720Z","repository":{"id":203856063,"uuid":"710527433","full_name":"mguinness/IdentityManagerBlazor","owner":"mguinness","description":"Identity management system for ASP.NET Core Identity.","archived":false,"fork":false,"pushed_at":"2023-11-20T00:37:42.000Z","size":410,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-23T19:12:48.077Z","etag":null,"topics":["aspnetcore","aspnetcoreidentity","blazor"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mguinness.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-26T22:07:42.000Z","updated_at":"2025-03-23T11:28:53.000Z","dependencies_parsed_at":"2023-11-20T01:37:41.398Z","dependency_job_id":null,"html_url":"https://github.com/mguinness/IdentityManagerBlazor","commit_stats":null,"previous_names":["mguinness/identitymanagerblazor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mguinness%2FIdentityManagerBlazor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mguinness%2FIdentityManagerBlazor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mguinness%2FIdentityManagerBlazor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mguinness%2FIdentityManagerBlazor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mguinness","download_url":"https://codeload.github.com/mguinness/IdentityManagerBlazor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250496991,"owners_count":21440231,"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":["aspnetcore","aspnetcoreidentity","blazor"],"created_at":"2024-12-12T20:14:46.944Z","updated_at":"2025-04-23T19:13:11.664Z","avatar_url":"https://github.com/mguinness.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Identity Manager Blazor\nIdentity management system for [ASP.NET Core Identity](https://github.com/aspnet/AspNetCore/tree/master/src/Identity) for use with .NET Core 7 and Bootstrap 5 and developed with [Blazor WebAssembly](https://learn.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-7.0#blazor-webassembly).\n\n**This GitHub project is deprecated.** Ongoing development can be found at \u003chttps://github.com/mguinness/IdentityManagerBlazorUnited\u003e.\n\n## Introduction\nWhen creating a new ASP.NET Core project you have the option to change the authentication to individual user accounts that adds a reference to [Microsoft.AspNetCore.Identity.UI](https://www.nuget.org/packages/Microsoft.AspNetCore.Identity.UI/) to include the identity system into your website. This includes registration, login and several pages related to user account self management like 2FA and password reset.\n\nThe missing piece to the puzzle is user management for the site. For ASP.NET membership there was [ASP.NET Website Administration Tool (WSAT)](https://docs.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-getting-started/deploying-web-site-projects/users-and-roles-on-the-production-website-cs) and for ASP.NET Identity there was [Identity Manager](http://brockallen.com/2014/04/09/introducing-thinktecture-identitymanager/) by Brock Allen.  AFAIK there is no solution available for ASP.NET Core Identity so this repo is an effort to remedy that.\n\n## Integration\n\nIn `Program` you will have to include references to `ApplicationUser` and `ApplicationRole` that are defined inside the UI component.\n\n```CSharp\nbuilder.Services.AddDefaultIdentity\u003cApplicationUser\u003e(options =\u003e\n    {\n        options.SignIn.RequireConfirmedAccount = true;\n    })\n    .AddRoles\u003cApplicationRole\u003e()\n    .AddEntityFrameworkStores\u003cApplicationDbContext\u003e();\n```\n\nIn your `ApplicationDbContext` you need to define the following navigation properties.\n\n```CSharp\nprotected override void OnModelCreating(ModelBuilder builder)\n{\n    base.OnModelCreating(builder);\n\n    builder.Entity\u003cApplicationUser\u003e().HasMany(p =\u003e p.Roles).WithOne().HasForeignKey(p =\u003e p.UserId).IsRequired().OnDelete(DeleteBehavior.Cascade);\n    builder.Entity\u003cApplicationUser\u003e().HasMany(e =\u003e e.Claims).WithOne().HasForeignKey(e =\u003e e.UserId).IsRequired().OnDelete(DeleteBehavior.Cascade);\n    builder.Entity\u003cApplicationRole\u003e().HasMany(r =\u003e r.Claims).WithOne().HasForeignKey(r =\u003e r.RoleId).IsRequired().OnDelete(DeleteBehavior.Cascade);\n}\n```\n\n## Setup\nAs the example project uses [FileBaseContext](https://github.com/dualbios/FileBaseContext) as the database provider there is no database setup needed since the ASP.NET Identity Core tables are stored in files, however for your own project you should use a [Database Provider](https://docs.microsoft.com/en-us/ef/core/providers/) to store these.\n\nRun the project and you will be able to use the website to manage users, roles and claims.  With the provided Identity tables stored as files you can login as admin@example.com with \"Password\".\n\n## Features\nThe first thing that you will likely do is create a new administrator role to manage additional users.\n\n![Screenshot](Images/AddRole.png)\n\nOnce done you can create a new user by providing basic information like username and password.\n\n![Screenshot](Images/AddUser.png)\n\nAfter the user has been created you can then edit email address and lock account if required. \n\n![Screenshot](Images/EditUser.png)\n\nIn the user edit dialog you can select the Roles tab to assign user to previously defined roles.\n\n![Screenshot](Images/EditRoles.png)\n\nIn addition you can also select the Claims tab to add or remove claims to the user being edited.\n\n![Screenshot](Images/EditClaims.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmguinness%2Fidentitymanagerblazor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmguinness%2Fidentitymanagerblazor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmguinness%2Fidentitymanagerblazor/lists"}