[HttpGet]
public ActionResult Login(string? returnUrl)
{
if (Request.IsAuthenticated)
{
if(returnUrl.HasValue)
return RedirectToAction("Index", "Home");
else
return RedirectToAction(returnUrl);
}
return View();
}

Error: The best overloaded method match for 'System.Web.Mbv.Controller.Redirect(string)' has some invalid arguments
How can use nullable string for RedirectToAction()
stringis already nullable.string?doesn't make sense. What are you try to do exactly?