title: Passportjs (after successful login)
body: <p>I have the following code borrowed from this excellent resource: <a href="http://scotch.io/tutorials/javascript/easy-node-authentication-setup-and-local#handling-signup/registration" rel="nofollow">http://scotch.io/tutorials/javascript/easy-node-authentication-setup-and-local#handling-signup/registration</a></p>
  
  <pre><code>app.post('/signup', passport.authenticate('local-signup', {
      successRedirect : '/profile', // redirect to the secure profile section
      failureRedirect : '/signup', // redirect back to the signup page if there is an error
  }));
  </code></pre>
  
  <p>but I don't want to use the <code>successRedirect</code> or <code>failureRedirect</code> as my front end is an Angularjs app. If the signup was successful I want to tell my Angularjs front end but how can I do this?</p>