lorenzh / fut-api

Ultimate Team API - FIFA 16 - unofficial
MIT License
53 stars 12 forks source link

Unable to log in #1

Closed rasheedu closed 8 years ago

rasheedu commented 8 years ago

Hi. I am unable to log in to the app using the api. What could I be doing wrong? Also, is there a way I could join and help out on the project?

lorenzh commented 8 years ago

hi. please update the package and try it again :) there was a bug in the login

here is a smaple

var readline = require('readline');

var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

var futapi = new(require("fut-api"))({
/*      
saveCookie: true,
      saveCookiePath: "c:\\temp\\cookie.json",
      loadCookieFromSavePath: true 
*/
});

futapi.login(
    "email",
    "password",
    "secret",
    function(send){        
        rl.question("Enter your two factor code:", function(code){
            send(code);
        });        
    }, 
    function(error, response){
        if(error) return console.log(error);

        futapi.getCredits(function(err, res){
            console.log(res);            
        });
    });

sure :+1: i am thankful for any help.

you can join my project on taiga.io to see the current tasks or select a item from the todo's

lorenzh commented 8 years ago

fixed in v0.1.9