Auth0 Home Blog Docs

Why is AddOpenIdConnect used instead of AddAuth0?

aspnet-core

#1

Hi!

I was taking a look at this tutorial, and i noticed that to set up the application they use the AddOpenIdConnect method instead of AddAuth0.

Why is that?


#2

@marcos.trucco I think the AddOpenIdConnect method is a .NET construct and not something Auth0 made. That is an extension method where the first parameter following the this argument is a string scheme. Here is a link to the doc that I believe that example is using.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.openidconnectextensions.addopenidconnect?view=aspnetcore-2.1#Microsoft_Extensions_DependencyInjection_OpenIdConnectExtensions_AddOpenIdConnect_Microsoft_AspNetCore_Authentication_AuthenticationBuilder_System_String_System_Action_Microsoft_AspNetCore_Authentication_OpenIdConnect_OpenIdConnectOptions__


#3

Oh, my bad. I mistook AddAuth0 with AddOAuth :man_facepalming:


#4

Haha, no worries! Let me know if there is anything else!

Happy coding.