Add support of google signin

This commit is contained in:
Cheng-Han, Wu 2016-05-21 22:48:00 +08:00
parent 900141daff
commit 6405bb5056
10 changed files with 47 additions and 8 deletions

View file

@ -76,6 +76,9 @@ module.exports = function (sequelize, DataTypes) {
//no image api provided, use gravatar
photo = 'https://www.gravatar.com/avatar/' + md5(profile.emails[0].value);
break;
case "google":
photo = profile.photos[0].value.replace(/(\?sz=)\d*$/i, '$196');
break;
}
return photo;
}