request: multi factor authentication support #40

Closed
shunter1112 opened this Issue Jan 7, 2013 · 4 comments

Projects

None yet

3 participants

@shunter1112

Hello.

Now I utilize your product with my biz account, but our company offer me to use multi factor authentication.

I set it, then happened.

/Users/shunter1112/.rvm/gems/ruby-1.9.3-p194/gems/google_drive-0.3.2/lib/google_drive/session.rb:88:in `rescue in login': Authentication failed for Response code 403 for post https://www.google.com/accounts/ClientLogin: Error=BadAuthentication (GoogleDrive::AuthenticationError)

Info=InvalidSecondFactor
from /Users/shunter1112/.rvm/gems/ruby-1.9.3-p194/gems/google_drive-0.3.2/lib/google_drive/session.rb:81:in `login'

thank you for your product, I love it. :)

@gimite
Owner
gimite commented Jan 7, 2013

Can you try to log in with application specific password instead of your normal password?:
http://support.google.com/accounts/bin/answer.py?hl=en&answer=185833

@gimite gimite closed this Feb 4, 2013
@brntsllvn

Hi, I am having the same issue. I replaced my password with my application-specific password and get the following error... I am using Nitrous.io, does this complicate things?

GoogleDrive::AuthenticationError in ContactsController#create
Authentication failed for brntsllvn@gmail.com: Response code 403 for post https://www.google.com/accounts/ClientLogin: Error=BadAuthentication Info=InvalidSecondFactor

def update_spreadsheet
connection = GoogleDrive.login(Rails.application.secrets.email_provider_username, Rails.application.secrets.email_provider_password)

SOLUTION:

Disable two-step verification in Google.

Go here: https://www.google.com/settings/security/lesssecureapps

Enable "Less secure apps"

Run app again.

@gimite
Owner
gimite commented Oct 1, 2014

The best solution would be to switch to use OAuth:
http://gimite.net/doc/google-drive-ruby/GoogleDrive.html#method-c-login_with_oauth

It should work with account with 2-step authentication enabled. Also, anyway login with user name + password will soon be unavailable in coming new version of google-drive-ruby.

In your solution, I guess you don't need to disable 2-step authentication, but just enable "less secure apps" and use application-specific password. I haven't verified it, though.

@brntsllvn

Thanks a bunch for the message. I will take a close look at OAuth.

On Wed, Oct 1, 2014 at 7:43 AM, Hiroshi Ichikawa notifications@github.com
wrote:

The best solution would be to switch to use OAuth:

http://gimite.net/doc/google-drive-ruby/GoogleDrive.html#method-c-login_with_oauth

It should work with account with 2-step authentication enabled. Also,
anyway login with user name + password will soon be unavailable in coming
new version of google-drive-ruby.

In your solution, I guess you don't need to disable 2-step authentication,
but just enable "less secure apps" and use application-specific password. I
haven't verified it, though.


Reply to this email directly or view it on GitHub
#40 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment