Closed chises closed 1 year ago
@Bur0k can u assist here?
Seems i never actually tested it with curl
or wget
- only in a browser.
I guess this is because the bank wants you to verify youself through a TAN. In my browser experiments I verified through TAN of course some time ago and a cookie was set in my browser. When i now try to open http://172.17.1.11:8083/?automate=true\&config=dkb.jso
in the browser this cookie will be sent as well.
Locally i couldn't get it working with curl
aswell and then tested my theory about the cookie. I looked up the PHPSESSID
cookie in my browser and than ran the following:
curl --cookie 'PHPSESSID=MyPhpSessId' http://172.17.1.11:8083/?automate=true\&config=dkb.jso
This then finally works.
So we need to implement easy way to authenticate ourselves via TAN and then get the cookie. Then we can use that with curl to do the querying headless. This also ties into the email notification issue I created some time ago https://github.com/bnw/firefly-iii-fints-importer/issues/75
All in all the headless mode somehow is still hackish - I hope I'll have time soon to think about implementing a better way. For now its retrieving the cookie manually. Sorry :/
I guess this is because the bank wants you to verify youself through a TAN. In my browser experiments I verified through TAN of course some time ago and a cookie was set in my browser. When i now try to open http://172.17.1.11:8083/?automate=true\&config=dkb.jso in the browser this cookie will be sent as well.
@Bur0k I think your analysis is not 100% correct:
curl
method. The fact that no re-authentication is necessary is, I believe, not based on anything stored in the session, but only based on the product key (https://github.com/bnw/firefly-iii-fints-importer/blob/master/app/FinTsFactory.php#L23) (a rather insecure design choice, imo).-> I have added the possibility to also configure the 2FA device via the config (see the current config file example). @chises Add this, and the error should be fixed. :)
@Bur0k I think your analysis is not 100% correct:
Indeed it is incorrect. I think i made the simplest mistake and forgot the quotes around the url and never looked deep into the output.
-> I have added the possibility to also configure the 2FA device via the config (see the current config file example). @chises Add this, and the error should be fixed. :)
Thanks for the analysis and quick fix :)
Your bank will occasionally issue 2FA challenges (e.g. TAN). There is currently no way to answer them through curl, you have to click through the browser forms instead
I should really start working on https://github.com/bnw/firefly-iii-fints-importer/issues/75 in order to get an email notification at least
@Bur0k Thank you very much, I will test it today!
Update: seeems to work. Addes a cronjob and will check it tomorrow :) Thank you!
Update 2: It is working, transactions are imported via cron with curl. 👍
Hello,
I am sorry but I am not able to use the headless feature.
wget -O - -q http://172.17.1.11:8083/?automate=true\&config=dkb.json
orcurl -X GET 'http://172.17.1.11:8083/?automate=true&config=dkb.json'
Output:Any hint what is wrong here? :)