Advertisement
Guest User

Untitled

a guest
Oct 7th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. 'use strict'
  2. var nforce = require('nforce');
  3. var org = nforce.createConnection({
  4. clientId: "***************************************",
  5. clientSecret: "*********",
  6. redirectUri: 'http://localhost:3000/oauth/_callback',
  7. environment: 'production',
  8. mode: 'single'
  9. });
  10.  
  11. console.log('Authentication Started......');
  12. org.authenticate({ username: "userid@domain.com", password: "pwd"}, function(err, resp){
  13. if(!err) console.log('Connected!');
  14. if(err) console.log('Error: ' + err);
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement