Problem with nuget package code

Code problem.
The signature for is ChallengeResult is “public ChallengeResult(string loginProvider, ApiController controller)”.
On nuget installation, the readme.txt file says to add the following to the account controller:

public ActionResult Login(string returnUrl)
{
return new ChallengeResult("Auth0", returnUrl ?? Url.Action("Index", "Home"));
}

The signatures do not match. Which is right/wrong and how do I fix or what have I done wrong?

Dave

Dave, can you please be more specific as to which framework you are using and which NuGet package you installed?

I am going to assume you are working with OWIN. In this case you need to understand that the ChallengeResult class is not a standard part of the framework, and likely got added to your application by some other NuGet package - I cannot say for certain

In either case, here is a sample of what the ChallengeResult class should look like:

https://github.com/auth0-samples/auth0-aspnet-owin-mvc-sample/blob/oidc-conformant/01-Login/MvcApplication/MvcApplication/Controllers/AccountController.cs#L32-L61

Feel free to add that code to your application, and perhaps just rename the class to ChallengeResult2 or whatever you feel appropriate, and then use that instead.