After a user logs in with their Google profile I am trying to redirect them back to the home page, however it keeps redirecting to default.aspx.
The line above the return in the code below is what I am using to try to redirect.
[System.Web.Mvc.AcceptVerbs(HttpVerbs.Post)]
public ActionResult Logon(string loginIdentifier)
{
if (!Identifier.IsValid(loginIdentifier))
{
ModelState.AddModelError("loginIdentifier", "The specified login identifier is invalid");
return View();
}
else
{
var openId = new OpenIdRelyingParty();
IAuthenticationRequest request = openId.CreateRequest(Identifier.Parse(loginIdentifier));
// Require some additional data
request.AddExtension(new ClaimsRequest
{
BirthDate = DemandLevel.NoRequest,
Email = DemandLevel.Require,
FullName = DemandLevel.Require
});
request.AddCallbackArguments("http://localhost:5977/Home/About", "http://localhost:5977/Home/About");
return request.RedirectingResponse.AsActionResult();
}
}
Any help would be appreciated, thanks!