mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-27 02:52:14 +01:00
13 lines
266 B
JavaScript
13 lines
266 B
JavaScript
var passport = require('passport')
|
|
, models = require('./models')
|
|
, bugsnag = require('bugsnag')
|
|
|
|
passport.serializeUser(function(user, done) {
|
|
done(null, user._id);
|
|
});
|
|
|
|
passport.deserializeUser(function(id, done) {
|
|
models.User.findOne({
|
|
_id: id
|
|
}, done);
|
|
}) |