I am creating an application that uses OmniAuth exclusively for logins, that is, users can log in using their various accounts from around the Internet. My site involves videosharing, so I would love to be able to have users login using their YouTube account.
I’ve successfully implemented: Facebook, Twitter, Gmail, foursquare, Vimeo and Netflix.
However I am having trouble getting it to work with YouTube. Mainly, I don’t know how I should be formatting the code in my initalizer. I’ve got this thus far:
require 'openid/store/filesystem'
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, 'CONSUMER_KEY', 'CONSUMER_SECRET'
provider :facebook, 'CONSUMER_KEY', 'CONSUMER_SECRET'
provider :open_id, OpenID::Store::Filesystem.new('/tmp'), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
provider :foursquare, 'CONSUMER_KEY', 'CONSUMER_SECRET'
#provider :linkedin, 'CONSUMER_KEY', 'CONSUMER_SECRET'
provider :netflix, 'CONSUMER_KEY', 'CONSUMER_SECRET'
#provider :tumblr, 'CONSUMER_KEY', 'CONSUMER_SECRET'
#provider :youtube, 'CONSUMER_KEY', 'CONSUMER_SECRET'
provider :vimeo, 'CONSUMER_KEY', 'CONSUMER_SECRET'
end
I would assume YouTube is similar in setup, as they are both run by Google, but I have yet to be able to find any information from either the OmniAuth end or the YouTube end.
Any suggestions?
omniauth / oa-oauth / lib / omniauth / strategies / you_tube.rb is about OmniAuth’s YouTube strategy. It should work with: