forked from btouellette/concarneau
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating e-mail notifications to use XOAuth2 rather than user/pass
- Loading branch information
1 parent
a543111
commit 852b5b0
Showing
2 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'); | ||
|
||
|
@@ -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 | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters