If the code fails the twitter handshake dance it’ll think there is a
use ID (in the session) but fail to pull it out of the database. User
will be undefined, however passport can’t handle that and will throw
an error. Setting user to null allows passport to gracefully carry
on.
If the code fails the twitter handshake dance it’ll think there is a use ID (in the session) but fail to pull it out of the database. User will be
undefined
, however passport can’t handle that and will throw an error. Settinguser
tonull
allows passport to gracefully carry on.