Skip to content

Instantly share code, notes, and snippets.

@chico
Created March 2, 2017 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chico/944fadff5a8a441b1ae2e5a6c793541c to your computer and use it in GitHub Desktop.
Save chico/944fadff5a8a441b1ae2e5a6c793541c to your computer and use it in GitHub Desktop.
passport.use(new MailChimpStrategy({
clientID: config.auth.mailchimpAuth.clientID,
clientSecret: config.auth.mailchimpAuth.clientSecret,
callbackURL: config.auth.mailchimpAuth.callbackURL,
passReqToCallback : true
},
function(req, token, refreshToken, profile, done) {
token = token + '-' + profile.dc; // Append datacenter to token for API calls to work
// Save and use token for doing Mailchimp API calls
}
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment