upcoming / upcoming-www

Upcoming.org Site
Apache License 2.0
168 stars 17 forks source link

Fix deserialize user throwing error #40

Closed revdancatt closed 7 years ago

revdancatt commented 7 years ago

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.