title: user authentication from Angularjs ( http get / resource ) using Passportjs
body: <p>I m trying to use Passportjs with Angular and express. I am trying to test facebook strategy in passportjs.</p>
  
  <p>The authentications seems to succeed but does not navigate to the callback url. It simplay hangs. </p>
  
  <p>Firebug console shows : 
      GET http://    localhost:7000/auth/facebook 302 Moved Temporarily" </p>
  
  <p>it however opens the callback url (index) successfully in the browser window when i manually click this url but not automatically redirecting  </p>
  
  <p>my login view ( jade )  looks as below :</p>
  
  <pre><code>a(href='/auth/facebook')
   p Login
  </code></pre>
  
  <p>and the serverside routes is :</p>
  
  <pre><code>app.get('/auth/facebook',  passport.authenticate('facebook'));
  app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/login' }),
  function(req, res) {
  res.render('index');
   });
  </code></pre>
  
  <p>Kindly help. This is my first experience with Angularjs &amp; Node js</p>
  
  <p><strong>EDIT</strong> : To be more precise , The issue only happens if my request is from client side ( login page in Angular ) to my express server.
          There is no issue if I serve the login page from within express. The authentication goes through fine and redirects to my applicatin as expected.</p>
  
  <p>Can we not make the authentication request from client side ( using http get / post ) to the server while the server handles the authentication using passportjs ?</p>