在我们的 MVC3 网络应用程序中使用以下内容添加 Google 登录,效果很好
app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() {
ClientId = ConfigurationManager.AppSettings["GoogleClientId"],
ClientSecret = ConfigurationManager.AppSettings["GoogleClientSecret"],
CallbackPath = new PathString("/GoogleLoginCallback"),
});
但是我的要求是不要自动登录,除非满足其他要求。我怎样才能防止它自动将它们设置为已验证?我只需要一个拦截器和几行代码来指示他们是否应该登录?