Skip to content

Commit

Permalink
updating e-mail notifications to use XOAuth2 rather than user/pass
Browse files Browse the repository at this point in the history
  • Loading branch information
btouellette committed Aug 24, 2016
1 parent a543111 commit 852b5b0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
9 changes: 7 additions & 2 deletions app/gameserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var cookie = require('cookie');
var cookieParser = require('cookie-parser');
var nodemailer = require('nodemailer');
var xoauth2 = require('xoauth2');
var twit = require('twit');
var auth = require('../config/auth');

Expand All @@ -20,8 +21,12 @@ var userToSocket = {};
var smtpTransport = nodemailer.createTransport('SMTP',{
service: 'Gmail',
auth: {
user: '[email protected]',
pass: process.env.EMAIL_PASSWORD
xoauth2: xoauth2.createXOAuth2Generator({
user: '[email protected]',
clientID : '859053446273-1e5ln4ca5gco80tl88a0kefj35id3eik.apps.googleusercontent.com',
clientSecret: process.env.GOOGLE_SECRET,
refreshToken: process.env.GOOGLE_REFRESH_TOKEN
})
},
secure: true // use SSL
});
Expand Down
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,30 @@
"name": "concarneau",
"main": "server.js",
"dependencies": {
"express": "~4.4.4",
"express-session": "~1.5.1",
"compression": "~1.0.8",
"bcrypt-nodejs": "latest",
"body-parser": "~1.4.3",
"compression": "~1.0.8",
"connect-flash": "~0.1.1",
"connect-mongo": "~0.8.2",
"cookie": "~0.1.2",
"cookie-parser": "~1.3.1",
"ejs": "~1.0.0",
"express": "~4.4.4",
"express-session": "~1.5.1",
"mongoose": "~4.1.6",
"moniker": "~0.1.2",
"nodemailer": "*",
"passport": "~0.2.0",
"passport-local": "~1.0.0",
"passport-facebook": "~1.0.3",
"passport-twitter": "~1.0.2",
"passport-google-oauth": "~0.1.5",
"connect-flash": "~0.1.1",
"connect-mongo": "~0.8.2",
"bcrypt-nodejs": "latest",
"tunnel": "0.0.3",
"socket.io": "~1.0.6",
"yargs": "~1.2.6",
"cookie": "~0.1.2",
"passport-local": "~1.0.0",
"passport-twitter": "~1.0.2",
"q": "~1.0.1",
"moniker": "~0.1.2",
"nodemailer": "~0.7.0",
"twit": "~1.1.15"
"socket.io": "~1.0.6",
"tunnel": "0.0.3",
"twit": "~1.1.15",
"xoauth2": "^1.2.0",
"yargs": "~1.2.6"
},
"devDependencies": {
"eslint": "^1.9.0"
Expand Down

0 comments on commit 852b5b0

Please sign in to comment.