Search code examples
c#authenticationwebapi2

Creating my own external authentication service


I'm trying to find a full tutorial on creating your own extent authentication service. Similar to the ones you see that say "Login with Google" or Facebook or Twitter... How do I create my own version of those? Including allowing creation of "apps", creating their app key and secret.

Maybe I'm searching for the wrong terms when looking, I'm not sure.

Ive have a need for a central login service where applications will be able to login a user and receive their information if they have sufficient permissions.

I'm using c# and web api 2 if this helps.

Thanks


Solution

  • IdentityServer (3 or 4 depending on your .Net preference) would be a good place to start. It is an open source project that supports the OAuth2 / Open ID protocols and is very well documented to show you where to plug in your app into the pipeline. https://identityserver4.readthedocs.io/en/release/index.html