Owin ExternalLogin之后的RedirectToAction将#hash添加到url

时间:2015-05-11 15:19:02

标签: asp.net-mvc oauth-2.0 owin

使用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中,我可以摆脱它吗?

0 个答案:

没有答案
相关问题