title: Custom returnUrl on Node.js Passport's Google strategy
body: <p>I'm using Express and Passport OpenID Google strategy and I would like to set returnURL on each auth request to be able to return to the page that initiated that auth. </p>
  
  <p>The situation is that I have HTML5 slides application with Node.js backend (and with social stuff and editor and Portal and extensions... <a href="https://github.com/bubersson/humla">https://github.com/bubersson/humla</a>) and I want be able to log in user on some slide (via slide menu...) but then I want him to get back to same slide easily.</p>
  
  <p>So I would need something like this?</p>
  
  <pre><code>app.get('/auth/google', function(req,res) {
     var cust = "http://localhost:1338/"+req.params.xxx;
     passport.authenticate('google', returnURL:cust, function ...
  } 
  </code></pre>
  
  <p>I've read Passport's guide, but still don't know how to do that. I know this wouldn't be safe, but how else could I do it?</p>
  
  <p>Or how can I make the application to return to the page from where the login has been initiated? Or is there a way to make OpenID authentication using AJAX (and still be able to use passport as well)? </p>