-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add automatic Gmail MFA #160
Add automatic Gmail MFA #160
Conversation
I am able to successfully authenticate with this PR. However, it appears that the api has changed. After authentication, when I attempt to use the library, I get this error
Looking at my network trace interacting with the website, the API seems to live at |
@booi I haven't taken a look at your code yet, but 2FA is not required yet. With 2FA disabled, this library still works as-is. When I login using the web interface, I do see the endpoints it's calling are different, and I believe required if you want to use 2FA. I unfortunately don't really have time to add support for 2FA, but I'd be really happy to accept a PR that makes it all work. |
@booi I FINALLY got around to integrating your PR into this library. (Had to deal with a bug in requests/urllib3). I have a branch with your code merged in and the auth issue you were describing is fixed (it was the requests/urllib3 bug). If you're still out there, would appreciate it if you'd give the branch a try and let me know if I merged it correctly. Thanks! |
@jeffreydwalter Hi! Sorry I must have missed the notification of this / don't pay a lot of attention to github emails. It appears to be merged correctly. You know, I ended up not using it since 2fa was not mandatory back then but it appears to be mandatory now so could come in useful? |
@booi @jeffreydwalter (Apologies if this has been discussed - and I could have sworn I saw this referenced elsewhere). Since these app that is granted gmail permission is in Any workarounds to this, or is it just something that needs to be done weekly? |
Ah interesting, that's why it stopped working periodically for me. I wonder if this is a (relatively) new behavior. I think the best thing to do would be to promote your app to production and take it out of test mode? If you end up doing that, please report back |
@booi looks like there is more you can do within a Google Workspace. I converted, will find out in 7 days ;) |
Hi all, I noticed that Arlo was enforcing MFA on all accounts now and this could break the Arlo python library which I use to backup videos.
This is a preliminary PR to add support for automatic MFA retrieval and submission without using SMS or other paid services. The only prerequisite is using a Gmail account. This PR also adds a new
LoginMFA
method that is conditionally called and contains a process that I've reverse engineered from Arlo's website.What this PR still needs:
requirements.txt
file. I wasn't able to figure out how to correctly update this file with the new dependencies.gmail_oauth.py
script needs to be made available to users in order to create their credential file.I'm copy and pasting the content in
docs/ARLO_MFA.md
here to aid in review.Instructions
gmail_oauth.py
scriptgmail.credentials
. This file will allow us to persistently access the gmail account programmatically.arlo = Arlo(USERNAME, PASSWORD)
arlo = Arlo(USERNAME, PASSWORD, '/path/to/gmail.credentials)
How it works
We are creating an OAuth application and registering it with Google. The
gmail_oauth.py
script forwards you to authenticate with this application and grant your application read-only access to your mailbox.When we initialize the Arlo class, the
LoginMFA
function: