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

Failed to authenticate #163

Closed
3 tasks
sirEgghead opened this issue Apr 8, 2024 · 6 comments
Closed
3 tasks

Failed to authenticate #163

sirEgghead opened this issue Apr 8, 2024 · 6 comments
Labels

Comments

@sirEgghead
Copy link

Please make sure you've done the following before submitting your issue:

  • [ + ] Check that you're running the newest version of the library.
  • If you're providing a stack trace, make sure it doesn't contain your password.
  • If you're getting a KeyError or ParseException, please follow the instructions here to dump the raw data.
  • If you're including any output, wrap them in triple quotes.

Additionally, please provide the following information:

  • [ + ] Operating system - Ubuntu 20.04
  • [ + ] Python version - 3.12.2 fresh with fresh venv

I'm using resume.py as my test bed, with no alterations.

I have 2FA on my Google account. I created an app password at https://myaccount.google.com/apppasswords. Using that app password, with or without the given spaces, I receive:

[INFO] https://accounts.google.com/signin/continue?sarp=1&scc=1&continue=https://accounts.google.com/o/android/auth?(truncated)
[ERROR] Failed to authenticate

I tried following the notes at the bottom of #81 linking me to @rukins method of manually obtaining an oAuth token, and I very quickly attempted to use that token in keep.resume() receiving [INFO] Invalid token as a result.

Using the password method, judging by the response that I got, it appears that gkeepapi isn't handling the callback and allowing me to 2FA? Not certain, but this is where I'm at. :)

@TarasShu
Copy link

TarasShu commented Apr 8, 2024

having same problem

@sirEgghead
Copy link
Author

Forgot to reference:

(venv)  ~/dev/project  pip show gpsoauth
Name: gpsoauth
Version: 1.0.4
Summary: A python client library for Google Play Services OAuth.
Home-page: https://github.com/simon-weber/gpsoauth
Author: Simon Weber
Author-email: simon@simonmweber.com
License: MIT
Location: /home/user/dev/project/venv/lib/python3.12/site-packages
Requires: pycryptodomex, requests, urllib3
Required-by: gkeepapi
(venv)  ~/dev/project  pip show gkeepapi
Name: gkeepapi
Version: 0.15.1
Summary: An unofficial Google Keep API client
Home-page: 
Author: 
Author-email: Kai <z@kwi.li>
License: 
Location: /home/user/dev/project/venv/lib/python3.12/site-packages
Requires: future, gpsoauth
Required-by: 

@kiwiz
Copy link
Owner

kiwiz commented Apr 13, 2024

I just uploaded 0.16.0. There's no changes to the resume() logic, but try updating and redoing the whole flow.

@sirEgghead
Copy link
Author

I'm still stuck in the same boat. I can't retrieve the master token, only the "quick" auth token. Still trying to figure that out.

@kiwiz
Copy link
Owner

kiwiz commented Apr 13, 2024

Just to double check, are you passing that token directly to resume() or generating a master token per https://gkeepapi.readthedocs.io/en/latest/#obtaining-a-master-token ?

@sirEgghead
Copy link
Author

@kiwiz there ya go! Thanks a ton! Following the instructions at https://github.com/simon-weber/gpsoauth#alternative-flow nabbed me the master token and I was able to authenticate with gkeepapi. Thanks! :)

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

No branches or pull requests

3 participants