使用google auth登录并重定向到home / index后,我会在网址中添加一个哈希#。
现在我注意到StackOverflow.com
有类似的事情,在我使用facebook登录后,我被重定向到:
http://stackoverflow.com/#_=_
我的控制器代码很标准:
[AllowAnonymous]
public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
{
var loginInfo = await HttpContext.GetOwinContext().Authentication.GetExternalLoginInfoAsync();
if (loginInfo == null)
{
return Content("failed");
}
// removed rest of the code to identify problem
return RedirectToAction("Index", "Home");
}
有人知道为什么这个哈希#出现在Url中,我可以摆脱它吗?