【发布时间】:2017-09-08 12:26:08
【问题描述】:
我已经开始研究 Google 登录并添加了正常的提供商。
ddGoogle(go =>
{
go.ClientId = "xxxxx";
go.ClientSecret = "-xxxxx";
go.SignInScheme = IdentityConstants.ExternalScheme;
});
我的测试方法只是为了开始它看起来像这样
public ActionResult TestGoogle()
{
var redirectUrl = Url.Action(nameof(ExternalCallback), "Account", new { ReturnUrl = "" });
var properties = _signInManager.ConfigureExternalAuthenticationProperties("Google", redirectUrl);
return Challenge(properties, "Google");
}
一切顺利,我去 google 登录并按预期获得所有必需声明的重定向。
问题是当我打电话给_signInManager.SignOutAsync() 时,它似乎没有做任何事情。没有错误,但是当我返回到我的 TestGoogle 操作时,我会使用所有凭据重定向到回调。
我缺少什么吗?
【问题讨论】:
标签: c# asp.net-core google-signin asp.net-core-identity