Normally this would not matter, but I am creating an AngularJS application, and #, added by an external ASP.NET Identity input (based on OWIN), breaks the chaos in the angularjs application.
You can even see it on the new default C # ASP.NET MVC site with Google without commenting in Startup.Auth.cs.
A # is added to the end of the URL when the user logs in and is redirected. I tried to manage this redirect myself, but to no avail ... a hash tag is always added.
Any ideas? Thanks in advance.
Update
The default solution uses a form to trigger an external login, for example:
using (Html.BeginForm(action, "Account", new { ReturnUrl = returnUrl }))
{
@Html.AntiForgeryToken()
<div id="socialLoginList">
<p>
@foreach (AuthenticationDescription p in loginProviders)
{
<button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button>
}
</p>
</div>
}
I don’t see anything in this add request #.
"", , :
private ActionResult RedirectToLocal(string returnUrl) {
if (Url.IsLocalUrl(returnUrl)) {
return Redirect(returnUrl);
}
else {
return RedirectToAction("Index", "Home");
}
}
return RedirectToAction("Index", "Home"); # URL-.
: return Redirect("/home/index");, # .
2
, Chrome.