Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Webclient.login() not working with 2fa #603

Open
GeorgePetri opened this issue Mar 4, 2018 · 3 comments
Open

Webclient.login() not working with 2fa #603

GeorgePetri opened this issue Mar 4, 2018 · 3 comments

Comments

@GeorgePetri
Copy link

I can' t seem to get Webclient.login() to work. I have a account with 2fa auth. I tried with an app password or my regular password.
Mobile client and Music manager work without issue.

I am using the webclient because it has report_incorrect_match and the other clietns don't have that.

Is there a workaround in the meantime?

Thanks.

@simon-weber
Copy link
Owner

Ah, yeah, webclient auth predates 2fa support. I don't think anyone's looked into moving it to something more reasonable.

If you want to play with it, you could probably take your auth cookies from a logged in session in the browser and then hardcode them into https://github.com/simon-weber/gmusicapi/blob/develop/gmusicapi/session.py. Alternatively, you could probably get away with scripting something based on a network tab copy-as-curl if the requests are still relatively straightforward.

@GeorgePetri
Copy link
Author

Is adding a optional parameter to login that represents the 2fa code hard to do? I can have the one time password before login because I use the Google Authenticator app.

I would greatly appreciate it if you help me with this. I tried a fix on this issue, specifically askvictor's answer but I couldn't get it to work.

@simon-weber
Copy link
Owner

I don't think it'd be too tough, but I don't personally plan to do more work on the webclient since it's so hard to maintain. I'm happy to give ideas or merge PRs.

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

No branches or pull requests

2 participants