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

Fail after second factor PIN entered #43

Closed
uriel1998 opened this issue Dec 13, 2014 · 12 comments
Closed

Fail after second factor PIN entered #43

uriel1998 opened this issue Dec 13, 2014 · 12 comments
Labels

Comments

@uriel1998
Copy link

I know the request is going through - I used one of my "backup codes" on it, and saw it disappear. However, I'm getting "Login failed (Second factor failed)" consistently.

The setup is workable; I have a throwaway google account (without second factor auth) that can log in just fine.

Fair warning: I know just enough to be dangerous to myself. Would posting the debug logs expose any private info?

@tdryer
Copy link
Owner

tdryer commented Dec 13, 2014

Have you tried with a PIN rather than a backup code? Have you tried logging in with a browser first?

I don't think the auth code logs any private info, but it's not likely to be very helpful either.

@uriel1998
Copy link
Author

Sorry I wasn't clear! Yeah, I was using the PINs generated by Authy. I've never had any problems with that. Successfully logged in with Chrome, Iceweasel (Firefox), and elinks2 to various Google services. I got a password check when trying

https://accounts.google.com/SecondFactor?continue=https%3A%2F%2Ftalkgadget.google.com%2Ftalkgadget%2Fgauth%3Fverify%3Dtrue&checkedDomains=youtube&pstMsg=0&skipvpage=true

which got me a page saying

You have logged in successfully. You can now refresh the page containing the Google Talk gadget and close this window.

But still no dice from hangups. It seems to be getting 301 and 302 errors from the connections at the end of the log. :/

@tdryer
Copy link
Owner

tdryer commented Dec 13, 2014

Can you try logging in with just your Google username rather than the full email address? Might be related to #35.

@uriel1998
Copy link
Author

No-go. :( I'm guessing that if I turn off 2-factor, sign in, and then turn it back on again I'll be back at this same place, huh?

@GermainZ
Copy link

Are you using an app specific password? If so, can you try without?

@tdryer
Copy link
Owner

tdryer commented Dec 13, 2014

I'm guessing that if I turn off 2-factor, sign in, and then turn it back on again I'll be back at this same place, huh?

I think so, yes.

Are you using an app specific password? If so, can you try without?

I'm pretty sure app specific passwords don't work.

@uriel1998
Copy link
Author

I've tried both app-specific and using the PIN from Authy. FWIW, I just set up another computer's gcalcli just fine, but it used a different auth method. The app-specific password was recognized as being used, but wasn't accepted. I'll try setting this up on the other system just in case there's something else weird I'm missing.

@tdryer
Copy link
Owner

tdryer commented Dec 13, 2014

If you'd like to use hangups before this gets fixed, here's a template for cookies.json. You can steal the relevant cookies from your browser using the dev tools.

{
  "SSID": "",
  "SAPISID": "",
  "HSID": "",
  "SID": "",
  "APISID": "",
  "NID": ""
}

@hughdavenport
Copy link

I played with this last night. I get same issue with PIN, using master password, then code generated by google authenticator. Logging in manually works fine.

I tried using a app specific password, and doesn't work, and trying manually gives an error saying use master password.

Would be good if we could not have to use master password, but we rely on the cookies right? How does the autosignin in chrome/ff on an android phone actually work, as I don't put in my master pass on there at all afaik.

In mean time will grab the cookies. I'm very keen to use this library. Was thinking of making a xmpp gateway type thing so you can have hangup+hughdavenport-joesmith@yourdomain.com where hughdavenport is you, and joesmith is a contact you want to contact via hangups. This approach could work with group chats as well, and you could do this all with your own xmpp server and a gateway to hangouts! (very up in the air on this atm, but keen to work on it over the break).

Cheers,

Hugh

tdryer added a commit that referenced this issue Dec 24, 2014
As well as being less code, this implementation should be more reliable.

Possibly fixes #35 and #43.
@tdryer
Copy link
Owner

tdryer commented Dec 24, 2014

There's a new auth implementation on the robobrowser-auth branch that might be more reliable. Switching to this branch will require a re-install because of dependency changes.

If it still doesn't work, try logging in from python -m hangups.auth and post the log output from stdout.

@HenryHu
Copy link

HenryHu commented Dec 28, 2014

I hit the same problem that after entering the PIN, it says "second factor failed".
After switching to robobrowser-auth it logged in successfully.

@uriel1998
Copy link
Author

Robobrowser worked for me as well.

@tdryer tdryer closed this as completed in 854ff13 Dec 31, 2014
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

5 participants