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

issue authenticating #254

Open
birchlore opened this issue Mar 17, 2016 · 4 comments
Open

issue authenticating #254

birchlore opened this issue Mar 17, 2016 · 4 comments

Comments

@birchlore
Copy link

I'm getting the error:

YouTubeIt::AuthenticationError: BadAuthentication

I just want to confirm my authentication details:

@client = YouTubeIt::Client.new(:username => "[email protected]", :password => "password_to_gmail", :dev_key => "youtube_api_credentials_key")

So,

  1. :username is my full gmail address? or just the name before @gmail.com? Or something else?
  2. :password is the password to above gmail account?
  3. :dev_key is a youtube_data server API key that I've generated from https://console.developers.google.com/apis/credentials

Does that all look right? Why would I be getting an authentication error? I've verified the credentials manually several times.

@birchlore
Copy link
Author

Turns out I had to go into my google profile settings to allow less secure apps to have access (I guess apps that don't use Oauth?)

screen shot 2016-03-17 at 4 33 42 pm

@pickhardt
Copy link

To confirm, @birchlore, this issue can be closed?

@birchlore
Copy link
Author

Hey @pickhardt yep, thanks! A note could be added to the readme if anyone else mentions it.

@flyingdeath
Copy link

I'm getting a 'AuthenticationError' when accessing current_user. So the code looks like:

client = YouTubeIt::Client.new(:username => params['user'],:password => params['pass'], :dev_key => dev_key)
begin
if client.current_user # 'AuthenticationError' here at runtime
end
session['user'] = params['user']
session['pass'] = params['pass']
redirect_to :controller => "mainpage", :action => "search"
rescue
session['user'] = nil
session['pass'] = nil
redirect_to :controller => "login", :action => "index"
end

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