lorenzh / fut-api

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

Saving Login Details #2

Closed rasheedu closed 8 years ago

rasheedu commented 8 years ago

Hi. Is there a way I could like save login details without having to log in every time? I am a bit new to this so forgive my ignorance

lorenzh commented 8 years ago

var futClient = new futApi ({ saveCookie: true, saveCookiePath: "c:\temp\cookie.json", loadCookieFromSavePath: true } ) ;

rasheedu commented 8 years ago

Okay. But I have that done, when I make a request like getCredits, I get this error: Cannot read property 'post' of undefined at sendRequest (/Users/_/node_modules/fut-api/index.js:178:31) at futApi.getCredits (/Users/_/node_modules/fut-api/index.js:72:7)

lorenzh commented 8 years ago

Is your login successful?

rasheedu commented 8 years ago

It is successful. I have the cookie file saved

rasheedu commented 8 years ago

And it successfully loads the cookie file. I am integrating it into a web app. The only time I can make requests is immediately I log in. Anything after that, I get the error. I noticed that when you load the cookie file, nothing is happening with the loginResponse variable

lorenzh commented 8 years ago

Hmm ok. I will try it tomorrow. I am not at home right now. Do you have the same problem with other functions?

lorenzh commented 8 years ago

I can't reproduce your issue. Could you give me a code sample?

lorenzh commented 8 years ago

Ok i have found a bug in the login. If u have only one game connected with your account everything works well but if u have a fifa 15 and fifa 16 account connected with your origin account u can login but u can't do anything.