我已经设置了我的asp.net MVC网站,允许通过Google登录:
在 App_Start \ Startup.Auth.cs
中var googlePlusOptions = new Microsoft.Owin.Security.Google.GoogleOAuth2AuthenticationOptions
{
ClientId = "someid",
ClientSecret = "somesecret",
SignInAsAuthenticationType = DefaultAuthenticationTypes.ExternalCookie,
};
googlePlusOptions.Scope.Add("email");
googlePlusOptions.Scope.Add("https://www.googleapis.com/auth/analytics.readonly");
app.UseGoogleAuthentication(googlePlusOptions);
我以为我会在声明列表中看到授权代码,但那里什么都没有。我从哪里获得授权代码?任何教程或帮助将不胜感激,我是MVC,OAuth和Google API的新手,并且感觉有点过头了。