Reputation:
I have this project where I am using Identity Server 4 and Web API. The Web API is protected by the ID server project. As I understood, it is a better practice to have the ID server sit in its own project and have its own database. However, I am not sure how user registration should happen.I have my username and password sitting in the ID Server and the rest of the user details (fname, lname, dob, etc...) sittin in my main database. So how should the registration take place?
I thought maybe to create an api in the ID server to manage the user (create) and I call this API from the web api project. But how can I protect this signup service? Only the web api project should call it?
Not sure if I am going the right way with the registration so any suggestions are welcomed.
Upvotes: 2
Views: 1969
Reputation: 3156
You are going the right way - you should write something custom. Identity Server doesn't provide user registration OOTB, it just uses a database that is provided (or whatever other store).
Good thing here is that you have a complete freedom. You can create a completely separate (let's call it) "Admin" solution, that can do this job for you.
You can also (as you said) use the Identity Server solution, create the API there, protect it with IDS, and couple it with the services, that you use to communicate with your database.
Upvotes: 2