jaredhanson/passport — pull request #153 by Jberlinsky (2013-07-08 19:36:38+00:00)
Title: Only call req.flash() when it is a defined function

When using certain frameworks (e.g. CompoundJS), req.flash is not a function, which causes the below error:

TypeError: Object # has no method 'flash'

This pull request detects if req.flash() is indeed a function. If it is, it uses that default functionality; otherwise, it sets a session variable which Compound uses in rendering flash messages.