Skip to content

Commit

Permalink
Fix jwt error signing recursive json when logging in from second browser
Browse files Browse the repository at this point in the history
  • Loading branch information
jimge2 committed Mar 19, 2017
1 parent 4519114 commit 933a342
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ passport.use(new FacebookStrategy({
],
});
if (users.length) {
done(null, users[0]);
const user = users[0].get({ plain: true });
done(null, user);
} else {
let user = await User.findOne({ where: { email: profile._json.email } });
if (user) {
Expand Down

0 comments on commit 933a342

Please sign in to comment.