docs: function getProfile(provider, access_token, callback) {
    let fields;
    switch (provider) {
      case 'facebook':
        facebook.query().get('me?fields=name,email').auth(access_token).request(function (err, res, body) {
          if (err) {
            callback(err);
          } else {
            callback(null, {
              username: body.name,
              email: body.email
            });
          }
        });
        break;
      case 'google':
        google.query('plus').get('people/me').auth(access_token).request(function (err, res, body) {
          if (err) {
            callback(err);
          } else {
            callback(null, {
              username: body.displayName,
              email: body.emails[0].value
            });
          }
        });
        break;
      case 'github':
        github.query().get('user').auth(access_token).request(function (err, res, body) {
          if (err) {
            callback(err);
          } else {
            callback(null, {
              username: body.login,
              email: body.email
            });
          }
        });
        break;
      case 'linkedin2':
        fields = [
          'public-profile-url', 'email-address'
        ];
        linkedin.query().select('people/~:(' + fields.join() + ')?format=json').auth(access_token).request(function (err, res, body) {
          if (err) {
            callback(err);
          } else {
            callback(null, {
              username: substr(body.publicProfileUrl.lastIndexOf('/') + 1),
              email: body.emailAddress
            });
          }
        });
        break;
      default:
        callback({
          message: 'Unknown provider.'
        });
        break;
    }
  }