title: Google Authentication via owin returns access denied
body: <p>I am using google owing middleware for authentication</p>
  
  <p>The following is my middleware setup</p>
  
  <pre><code> app.UseCookieAuthentication(new CookieAuthenticationOptions
          {
              //AuthenticationType = AuthServerConstants.PrimaryAuthenticationType
              AuthenticationMode = AuthenticationMode.Passive,
              AuthenticationType = DefaultAuthenticationTypes.ExternalCookie,
              ExpireTimeSpan = TimeSpan.FromMinutes(30)
          }).UseExternalSignInCookie(AuthServerConstants.ExternalAuthenticationType);
  </code></pre>
  
  <p>The following is my google Middleware</p>
  
  <pre><code>var google = new GoogleOAuth2AuthenticationOptions
          {
              ClientId = AppSettingHelpers.GetValue&lt;string&gt;(AppSettingConstants.GoogleAppId),
              ClientSecret = AppSettingHelpers.GetValue&lt;string&gt;(AppSettingConstants.GoogleAppSecret),
              SignInAsAuthenticationType = signInAsType,
              AuthenticationMode = AuthenticationMode.Passive
          };
          app.UseGoogleAuthentication(google);
  </code></pre>
  
  <p>I have enabled the Google+API in the google developer console</p>
  
  <p><img src="https://i.stack.imgur.com/qlgJr.png" alt="enter image description here"></p>
  
  <p>I am using Google Middleware version 2.1. My google authentication still returns <code>error=access_denied</code></p>
  
  <p>can anyone let me know what could have been missed out in this process.</p>
  
  <p><strong>NOTE</strong>
   My external authentication cookie middleware does not set the cookie yet in the browser.</p>