Hi everyone, I'm trying to learn the rails, and I'm working on an application that uses Google to log in, as well as for calendar data. I am currently working on setting up authlogic-oauth and with some problems.
I am following the manual for the authlogic-oauth plugin (see link above), and I am in steps 4 and 5. At first I am still learning the language, and I'm not sure where the code from step 4 goes to the controllers:
@user_session.save do |result| if result flash[:notice] = "Login successful!" redirect_back_or_default account_url else render :action => :new end end
Secondly, I'm trying to set up step 5, the actual google oauth data step:
class UserSession < Authlogic::Session::Base def self.oauth_consumer OAuth::Consumer.new("*TOKEN*", "*SECRET*", { :site=>"**http://google.com**", :authorize_url => "*http://google.com/xxx*" }) end end
I'm not quite sure where I find the information I need to fill out. I read hxxp: //code.google.com/apis/accounts/docs/OAuth_ref.html (sorry, I can only send one hyperlink), but I'm just not sure where I get everything and what the plugin handles for itself.
Finally, I'm not quite sure how I get calendar information, I was just told that I can someone from the IRC. Am I doing this through this plugin or do I need to use another one?
Many thanks!
ruby-on-rails oauth authlogic
Zak
source share