使用微软OWIN GoogleOAuth2AuthenticationOptions如何添加自定义逻辑?

问题描述 投票:0回答:0

在我们的 MVC3 网络应用程序中使用以下内容添加 Google 登录,效果很好

                app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions() {
                ClientId = ConfigurationManager.AppSettings["GoogleClientId"],
                ClientSecret = ConfigurationManager.AppSettings["GoogleClientSecret"],
                CallbackPath = new PathString("/GoogleLoginCallback"),
            });

但是我的要求是不要自动登录,除非满足其他要求。我怎样才能防止它自动将它们设置为已验证?我只需要一个拦截器和几行代码来指示他们是否应该登录?

asp.net-mvc google-signin
© www.soinside.com 2019 - 2024. All rights reserved.