huMpty duMpty
huMpty duMpty

Reputation: 14470

AspNetCore MVC - ControllerBase.Challenge Issue

Trying to use Challenge(AuthenticationProperties, String[]) as below in my mvc project

 [Authorize]
 public IActionResult SignIn()
 {
     return Challenge(new AuthenticationProperties { RedirectUri = "/" }, OpenIdConnectDefaults.AuthenticationScheme);
 }

But getting following error

cannot convert from Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties to string

Am I doing something wrong here?

Updated

enter image description here

Upvotes: 1

Views: 1169

Answers (1)

huMpty duMpty
huMpty duMpty

Reputation: 14470

Found the issue

It was the reference to AuthenticationProperties

This come from both Microsoft.AspNetCore.Authentication and Microsoft.AspNetCore.Http.Authentication

It was pointing to Microsoft.AspNetCore.Http.Authentication which caused the issue

Upvotes: 1

Related Questions