
module.exports = function (server) {

  /**
   * Logout
   *
   * What else do we need to do here besides kill the
   * local session? Redirect to a page that will wipe
   * localStorage?
   */

  function signout (req, res) {
    req.logout();
    res.send(204);
  }

  server.get('/signout', signout);
  server.post('/signout', signout);

};


@@ -58,193 +58,265 @@
    *
+/%0A
 %0A  
- * What else do we need to do here besides kill the%0A   * local session? Redirect to a page that will wipe%0A   * localStorage?%0A   */%0A%0A  function signout (req, res) %7B%0A    req.logout();%0A
+function signout (req, res) %7B%0A    var redirectUri = req.query.redirect_uri;%0A%0A    req.logout();%0A%0A    res.set(%7B%0A      'Cache-Control': 'no-store',%0A      'Pragma': 'no-cache'%0A    %7D);%0A%0A    if (redirectUri) %7B%0A      res.redirect(redirectUri);%0A    %7D else %7B%0A  
     
@@ -330,16 +330,23 @@
 d(204);%0A
+    %7D%0A%0A
   %7D%0A%0A  s

support signout redirect