How to create/use custom External Login

Jalza 761 Reputation points
2022-01-20T14:55:07.873+00:00

I need to use an external login in my ASP.NET Core web application. This external login is going to be from another provider. This provider will be a platform that will soon start to develop, that is, it will not be any big provider that exists right now (Microsoft, Google, Amazon, Github, etc). We have been given the option to specify which mechanism to use for this external login. I think OAuth is a good option.

I have read in the documentation that there are several OAuth providers available in the AspNet.Security.OAuth.Providers library. But I haven't found how I can add a custom provider.

Is it possible to configure a provider other than one that is listed in the library?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,731 Reputation points
    2022-01-20T17:22:07.603+00:00

    oauth is a standard protocol and you can configure for a custom one that matches the protocol. you will need to know which flow they implement, and configure the oauth settings to match their requirements. you will need to know the scopes and claims they will support. you config with AddOpenIdConnect

    here are samples for different providers:

    https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/tree/dev/src

    0 comments No comments