function linkSuccess(req, res, next) {
    var provider = getProvider(req.path);
    var result = {
      error: null,
      session: null,
      link: provider
    };
    var template;
    if(config.getItem('testMode.oauthTest')) {
      template = fs.readFileSync(path.join(__dirname, '../templates/oauth/auth-callback-test.ejs'), 'utf8');
    } else {
      template = fs.readFileSync(path.join(__dirname, '../templates/oauth/auth-callback.ejs'), 'utf8');
    }
    var html = ejs.render(template, result);
    res.status(200).send(html);
  }
function linkSuccess(req, res, next) {
    var provider = getProvider(req.path);
    var result = {
      error: null,
      session: null,
      link: provider
    };
    var template;
    if(config.getItem('testMode.oauthTest')) {
      template = fs.readFileSync(path.join(__dirname, '../templates/oauth/auth-callback-test.ejs'), 'utf8');
    } else {
      template = fs.readFileSync(path.join(__dirname, '../templates/oauth/auth-callback.ejs'), 'utf8');
    }
    var html = ejs.render(template, result);
    res.status(200).send(html);
  }
function linkSuccess ( req , res , next ) { var provider = getProvider ( req . path ) ; var result = { error : null , session : null , link : provider } ; var template ; if ( config . getItem ( 'testMode.oauthTest' ) ) { template = fs . readFileSync ( path . join ( __dirname , '../templates/oauth/auth-callback-test.ejs' ) , 'utf8' ) ; } else { template = fs . readFileSync ( path . join ( __dirname , '../templates/oauth/auth-callback.ejs' ) , 'utf8' ) ; } var html = ejs . render ( template , result ) ; res . status ( 200 ) . send ( html ) ; }
Called after an account has been succesfully linked
Called after an account has been succesfully linked