Hi,
I've been trying to configure IdentityServer4 to work with a custom user service such that it authenticates users from my database. I was able to do it when I was working with IdentityServer3 by using IUserService but I understand that that's been replace by IProfileService in IDS4.
Could someone please point me towards an example of how to get this to work with IdentityServer4? This would be extremely helpful!
I've been searching through different articles and everything seems to be obsolete. It would be great if someone could point me to an implementation that actually works with the latest version of IDS4 including the AccountController and UI bits.
Thanks
Here's a starting point for UI/controllers:
https://github.com/IdentityServer/IdentityServer4.Quickstart.UI
Not the original poster, but a related follow up question:
If I understand correctly, with IS4 vs IS3, instead of a single IUserService implementation, you really need to do two if you want to support non-interactive services authenticating as a user (via RequestResourceOwnerPasswordAsync, as an example).
In the former case you have to physically change the authentication webpage, and componentizing it or not is up to the developer, and in the latter case, the same logic needs to be replicated in an implemenation of IResourceOwnerPasswordValidator? Is there a reason there's two paths for that? And is there any examples for using IResourceOwnerPasswordValidator? I haven't found anything that shows how to register it, the equivalent of "factory.UserService = new Registration
As a meta comment about it, the docs probably should call this out explicitly, as its not at all obvious that there's no centralized point to extend IdentityServer anymore for custom authentication...
@leastprivilege
Thanks for the reply. Though setting up the IS4 with custom user repository is only a small part of my project so was really hoping for a working sample that I could tweak and plug into my solution. Since such solutions are available for IS3 I was hoping someone might have been down this path and shared a working example somewhere??
Also as a suggestion, I believe IdentityServer is a remarkable product but docs are ambiguous at best. It would be great if working samples are added or at least linked/referenced within. The product appears to be undergoing several changes/upgrades frequently as well so it's hard to keep setting time aside with tight deadlines to research and sort it out.
If someone has a working example of IS4 hooked up with a custom user repository (and without Entity Framework please) that would be a huge help as I need to put together a proof of concept in a couple of weeks to convince my team to implement IS4.
Thanks in advance!
it's still pre-release. but close to RTM.
setting up the IS4 with custom user repository is only a small part of my project
but a very important one
but docs are ambiguous at best
I don't follow. If you have improvements - we accept PRs
@lpghartz I think that is a little different - you have one user management library (think ValidateUser) that you call from both places.
Most installations don't need support for the password grant at all since it is only recommended for very specific scenarios.
Any update on the issue? closing for now - feel free to re-open if it needs further discussion.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@leastprivilege
Thanks for the reply. Though setting up the IS4 with custom user repository is only a small part of my project so was really hoping for a working sample that I could tweak and plug into my solution. Since such solutions are available for IS3 I was hoping someone might have been down this path and shared a working example somewhere??
Also as a suggestion, I believe IdentityServer is a remarkable product but docs are ambiguous at best. It would be great if working samples are added or at least linked/referenced within. The product appears to be undergoing several changes/upgrades frequently as well so it's hard to keep setting time aside with tight deadlines to research and sort it out.
If someone has a working example of IS4 hooked up with a custom user repository (and without Entity Framework please) that would be a huge help as I need to put together a proof of concept in a couple of weeks to convince my team to implement IS4.
Thanks in advance!