pytr-org / pytr

Use TradeRepublic in terminal and mass download all documents
https://pypi.org/project/pytr/
MIT License
357 stars 59 forks source link

Session is not invalidated when a new login with different number occurs #38

Open felix-exon opened 1 year ago

felix-exon commented 1 year ago

Description of the bug When working with multiple accounts even if a different phone number and pin are supplied the previous session gets resumed.

To Reproduce Login using pytr login using an existing key file. Then pytr login -n <somenumber> -p <somepin>. Might as well save a new key file. Now pytr dl_docs will use the first account not the one which was logged in last (given the session is still valid).

10:58:25 Found credentials file
10:58:25 Phone: +49***********, PIN: ****
10:58:29 Web session resumed.                           // <----- This should not be
10:58:29 Logged in
10:58:29 Created history file

Expected behavior When logging in with a number other than the one the active session is linked to, I expect a the session to be invalidated and a new session to start.

Error log

Environment

hansgans007 commented 5 months ago

Yeah it’s used the old session not the new one

hansgans007 commented 5 months ago

@marzzzello