Created
December 12, 2012 18:13
-
-
Save kevinohara80/4270163 to your computer and use it in GitHub Desktop.
express.js middleware function for checking that the nforce oauth data exists in the user's session.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use(function(req, res, next) { | |
if(!req.session.oauth) res.redirect('/authorize'); | |
else next(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment