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

request: multi factor authentication support #40

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

request: multi factor authentication support #40

shunter1112 opened this issue Jan 7, 2013 · 4 comments

Comments

@shunter1112
Copy link

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
Copy link
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

@brntsllvn
Copy link

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
Copy link
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
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants