title: Node Passport-facebook login in Facebook Page Tab application
body: <p>I'm developing a web application in NodeJS and AngularJS, that is a PageTab application to facebook.</p>
  
  <p>For the login I'm using the library <a href="http://passportjs.org/guide/facebook/" rel="nofollow">Passport-facebook</a>. </p>
  
  <p>My middleware is:</p>
  
  <pre><code>passport.authenticate('facebook', {
          display: 'popup',
          scope: ['read_stream', 'publish_actions', 'email', 'user_photos']
      })
  </code></pre>
  
  <p>The application works if i'm outside the tab of facebook, but when I try into facebook tab, 
  I get an error: </p>
  
  <pre><code>[Error] Refused to display'Http....'in a frame because it set 'X-Frame-Options' to 'DENY'. (login, line 0)
  [Error] SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
  </code></pre>
  
  <p>Because <code>facebook permission dialog</code> can't be launched from an iFrame</p>
  
  <p>What can I do to fix, keeping the session management with passport strategy?</p>