title: DotNetOpenAuth OAuth authorization using popup window in ASP.Net
body: <p>I need to use a <strong>popup window</strong> for Google OAuth authentication. I am using DotNetOpenAuth library to do the authentication and it is working on same page. How can I do this on popup window. I have look around by googling and I have found few and one of them is " <a href="https://stackoverflow.com/questions/10797714/specify-request-parameters-in-dotnetopenauth-4">Specify request parameters in dotnetopenauth 4</a>" But the way I am using this library I don't know where I can set the popup window. </p>
  
  <p>This is my code. </p>
  
  <p>private string AccessToken
      {
              get { return (string)Session["GoogleAccessToken"]; }
              set { Session["GoogleAccessToken"] = value; }
          }</p>
  
  <pre><code>    private static readonly GoogleClient googleClient = new GoogleClient
      {
          ClientIdentifier = ConfigurationManager.AppSettings["googleConsumerKey"],
          ClientCredentialApplicator = ClientCredentialApplicator.PostParameter(ConfigurationManager.AppSettings["googleConsumerSecret"]),
      }; 
  
      protected void Page_Load(object sender, EventArgs e)
      {                        
          if (googleClient != null)
          {
  
              if (!IsPostBack)
              {
                  var authorization = googleClient.ProcessUserAuthorization();
                  if (authorization != null)
                  {
                      this.AccessToken = authorization.AccessToken;
                  }
                  else if (this.AccessToken == null)
                  {
                      googleClient.RequestUserAuthorization(scope: new[] { GoogleClient.Scopes.WebMaster.SiteVerification, GoogleClient.Scopes.WebMaster.WebMasterTools });
  
                  }
              }
          } 
      }
  
  
  private static readonly AuthorizationServerDescription GoogleDescription = new AuthorizationServerDescription {
      TokenEndpoint = new Uri("https://accounts.google.com/o/oauth2/token"),
      AuthorizationEndpoint = new Uri("https://accounts.google.com/o/oauth2/auth"),   
      ProtocolVersion = ProtocolVersion.V20,            
  };
  </code></pre>
  
  <p>Could you please help me on this (I am new to ASP.Net)? Thanks</p>