icastillejogomez / degiro-api

Unofficial DeGiro stock broker API. See your portfolio and set up orders in the market like wall street
MIT License
195 stars 29 forks source link

Added the ability to log in when using one time passwords. #13

Closed danielvandenberg95 closed 3 years ago

danielvandenberg95 commented 3 years ago

I forgot to compile, so please use squash commit to complete this PR in one commit.

icastillejogomez commented 3 years ago

Okay, you are right. Re-use session on test set is a great nice-to-have. I'm going to merge your code and check if pass the tests with my account that has not OTP.

Good job and thank you!

arendjr commented 3 years ago

Why do you perform two requests with OTP -- first the one without the OTP, followed by the one with OTP? It appears sending the one with OTP directly works as well.

icastillejogomez commented 3 years ago

Could be a great pull requests! You're right!

arendjr commented 3 years ago

Hi, I won't be creating PRs as I'm working on a competing implementation (WIP for Rust), but I'm happy to share my findings as I go along :)

On that note, from my testing, it appears the Referer header and the isPassCodeReset, isRedirectToMobile and queryParams properties shouldn't be necessary.

Would you like me to file issues whenever I stumble upon things?