youtube_it icon indicating copy to clipboard operation
youtube_it copied to clipboard

AuthenticationError (BadAuthentication) in production environment with youtube new accounts

Open hyperrjas opened this issue 11 years ago • 4 comments

In my dev environment with localhost:3000 my new google plus username and password does works fine. I'm getting these data from google page settings:

screen

If you are using this new google plus settings, you must set up a new password from this page and use this password and this username in your youtube_it.yml file.

However when I try upload a video from my production domain I'm getting this error:

Completed 500 Internal Server Error in 263.8ms
AuthenticationError (BadAuthentication):

Thanks

hyperrjas avatar Feb 24 '14 17:02 hyperrjas

I'm getting AuthenticationError: BadAuthentication always. Just cloned the sample app, bundle install, rake db:migrate and rails s.

Whenever I try to upload a video, I get AuthenticationError: BadAuthentication. So I have to ask, although it seems to me like a silly question: what is the username and password that I have to put in the config/youtube_it.yml file? I assume it's something like:

common: &common
  dev_key: "my-developer-key"
  username:  "[email protected]"
  password:  "my-gmail-password"

Or is it something else?

gnapse avatar Oct 29 '14 18:10 gnapse

I found what was the problem. I have two-step authentication enabled on my google account, so the API client did not work with my regular password. I had to generate an app-specific password for it.

gnapse avatar Nov 03 '14 17:11 gnapse

@gnapse did the api client work in dev with localhost:3000 even thought you had the two-step authentication?

I'm not sure about this, but I think that when the app tries to log in from production it's very likely that the server is in a different place than your computer and the sign-in is prevented by google.

https://security.google.com/settings/security/activity

jonasmora avatar Jan 14 '15 01:01 jonasmora

I don't know about production. I was using my own credentials just to test the app, on a development environment on localhost:3000. Probably on production it wouldn't work the same, but I never intended to use my own account with two-step auth in production.

gnapse avatar Jan 15 '15 17:01 gnapse