Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes to handle changes to Personal Capital CSRF token parsing #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hammem
Copy link

@hammem hammem commented Jul 3, 2022

Fixes to get login working again for this API.

  • updated regex parsing of the CSRF token
  • change the user-agent header to get through Cloudflare filtering
  • raise useful exceptions to aid in future debugging
  • set device name to Personal Capital Python API, to make identifying session in the account easier

Mark Hammell and others added 2 commits July 3, 2022 16:42
Adds methods for saving and loading a session, to avoid having to
authenticate each time the API is used in a new execution, kernel
instance, etc.  Both the session cookies and CSRF token are stored to a
file via Python's bulit-in pickling.

Both methods take a file name param, to define where the data should be
written or read.
@hammem
Copy link
Author

hammem commented Jul 20, 2022

@haochi , are you able to review this PR? PersonalCapital made some slight changes to how they store the CSRF token that prevents the API currently in master from functioning.

@deanjgoldman
Copy link

@hammem Did you ever run into an authenticate_password error: "Authorization required."? Not exactly sure what to do with it. I don't have 2FA. On __identify_user() I am getting back a "USER_IDENTIFIED" auth_level, not a "USER_REMEMBERED". Wondering if there's a simple explanation. Ty!

@Dabnsky
Copy link

Dabnsky commented Nov 18, 2022

just wanted to add feedback about how this branch resolved my issues. I had to go reset my password to get my account unlocked before it would work.

@mjm2z
Copy link

mjm2z commented Nov 23, 2022

@deanjgoldman @hammem I'm having the same issue with auth_level = USER_IDENTIFIED instead of USER_REMEMBERED, any ideas?

@konecnyna
Copy link

The lib was broken the last 1-2 weeks for me. This branch fixed it.

I'm wondering what will happen when/if "empower" full takes over the domain and page. The domain is still personalcapital for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants