title: How can I do OAuth request by open new window, instead of redirect user from current page?
body: <p>I have done OAuth authentication with Twitter and Facebook. Currently, with each of these site, my server redirect user to a specified URL (for example, <a href="http://api.twitter.com/oauth/authorize" rel="noreferrer">http://api.twitter.com/oauth/authorize</a> with Twitter), then receive authentication parameters by callback url.</p>
  
  <p>But by that way, the users get redirected out of my page (to Facebook or Twitter), and only returns after input correct username &amp; password. It's like the way <a href="http://techcrunch.com" rel="noreferrer">http://techcrunch.com</a> do it when a user try to tweet a post.</p>
  
  <p>I remember that in some site, I have seen that we can connect not by redirect user out, but open a popup window for user to input credentials instead. After authentication is completde, the pop-up closed, the main page refresh with new content.</p>
  
  <p>This could be a very simple task with javascript, but I still can't figure it out. I can open authentication URL in a pop-up window, but how to get the result &amp; update the main page?</p>