Hello,
First of all, big thanks for doing this. You saved me a tremendous amount of work.
Why haven't you connected IdentityServer4 to the database modified by Admin panel? I understand that you could've done for the sake of simplicity and that's why you've opted for in memory stores but I'm curious if there's any other reason.
I'm working on having IS from Skoruba.IdentityServer4 connected to database modified in Skoruba.IdentityServer4.Admin. If I connect them are you interested in a pull request?
Hello @xmichaelx
I really appreciate your feedback.
You are right, the in-memory users / clients in Skoruba.IdentityServer4 are for simplicity.
I will be happy for any pull request from you. I will consider your idea.
It's possible to follow this sample for doing that - https://github.com/IdentityServer/IdentityServer4.Samples/tree/release/Quickstarts/Combined_AspNetIdentity_and_EntityFrameworkStorage
Btw: What do you think about issue #28 - creating the UI and services as nuget package?
Certainly, it would be nice to have a nuget package. Add to that some ability for branding with additional powered by <here your credentials> and you have a very nice, generic solution.
Right now I'm trying to reference AdminDbContextbut for that I need to reference dll with Skoruba.IdentityServer4.Admin. Unfortunately this creates situation where I reference another MVC project and I fail because of:
InvalidOperationException: The AuthorizationPolicy named: 'RequireAdministratorRole' was not found.
As I understand this policy is present on controllers in the Skoruba.IdentityServer4.Admin.Controllers namespace. I need to find a way to only reference AdminDbContext without MVC picking up all MVC stuff from the other assembly :)
It's interesting. I think it's time to split the project into two parts - UI and Services.
Thank you - I'll check it and create some fix for this use case. :)
This is quick&dirty:
var builder = services.AddMvc();
// this removes assembly which is included for AdminDbContext only
var admin = builder.PartManager.ApplicationParts.Single(x => x.Name == "Skoruba.IdentityServer4.Admin");
builder.PartManager.ApplicationParts.Remove(admin);
but works.
I see. :) I think, splitting of the solution will be better approach - but good quick workaround.
I agree, splitting solution will be much better.
DONE.
Most helpful comment
41 - splitting solution, next step will be switching the inmemory store to the database.