jamiew / omniauth-youtube

OmniAuth 1.0 strategy for connecting to YouTube
https://github.com/jamiew/omniauth-youtube
19 stars 18 forks source link

access_type #6

Closed pwgustafson closed 12 years ago

pwgustafson commented 12 years ago

I am having trouble setting the access_type through devise.rb initializer:

config.omniauth :youtube, '###', '###', { access_type: 'offline', approval_prompt: '' }

I believe I have the syntax correct, but when I get passed along to allow an application access, the access_type AND approval_prompt are NOT present in the URL string...

What am I doing wrong?

jamiew commented 12 years ago

Are you reloading the Rails server between configuration changes?

pwgustafson commented 12 years ago

Yes, I have tried that as well, but doesn't seem to change...

I am on rails 3.2 if that helps?

Thanks!

pwgustafson commented 12 years ago

Are you seeing the same issue or am I taking crazy pills?

Thanks!

pwgustafson commented 12 years ago

Any update on this, @jamiew Do you know of a way to get this working?

pwgustafson commented 12 years ago

I figured this out. Basically, I was trying to configure omniauth via devise (in devise.rb initializer) - to connect to the youtube api.

in my config file, I had:

config.omniauth :youtube, '###', '###', { :access_type => 'offline', :approval_prompt => 'force' }

so I changed it to:

config.omniauth :google_oauth2, '###', '###', { :access_type => 'offline', :approval_prompt => 'force' }

Thanks @jamiew !