fut-api
fut-api copied to clipboard
Possible to save EA-Session
Hi,
how can I save the login-details, that I don´t need to login every time i'll restart the server?
I'm using these options:
`var options = { saveCookie: true, saveCookiePath: "cookies.json", loadCookieFromSavePath: true }
var apiClient = new futapi(options);`
Is there a hidden method, which I´m supposed to call?
LloadCookieFromSavePath should be the same as saveCookiePath. Please look at the docs before opening an issue! :)
loadCookieFromSavePath
should be a boolean value. I'm using nearly exact the same options but I call the login
method at least once. It will check itself, if it has to make a fresh login or can use the cookie, but as far as I know you have to call login
at least once because EA implemented some security mechanisms which you have to go through first.
Thanks. I'll try 'loadCookieFromSavePath' with a String after work.
@BenjaminPaap, how can you use the login-method once? I'm new to NodeJS (so maybe sorry for the question) and my application is running on a Debian server. I don't know how I can wait in the 'next' method for another client request, respectively call the next function from another request (outside the firstone).
My login works something like this:
- Sending login request with email and password
- using login-function with random code and create Session user with Email and pw
- sending another request with two factor code an serect answer
- get email/pw from first request and code/secret from the second one
- using login-function again
@derSoerrn95 in the fork of this repo (https://github.com/futjs/fut-api) there is a loginCached method which only using tokens fetched previously by login method. I think thats what you searching for.