CARVIEW |
Every repository with this icon (

Every repository with this icon (

Description: | Authlogic OAuth is an extension of the Authlogic library to add OAuth support. OAuth can be used to allow users to login with their Twitter credentials. edit |
Loading…
-
Registration error when used in conjunction with authlogic_openid
5 comments Created about 1 month ago by omarkarimHello,
I'm getting an ActionController::DoubleRenderError when using authlogic_oauth to register a user with authlogic_openid also installed. The user is being saved in a block as recommended: @user.save do |result| etc...
At first glance it seems the save method could be the culprit since it's being overridden by both authlogic_openid and authlogic_oauth? Any help would be greatly appreciated.
Thanks!
Comments
-
I get the following error when using the User model in a environment where there is no controller.
Simplest solution is to add a condition to the authenticating_with_oauth? method in acts_as_authentic.rb:def authenticating_with_oauth? if session_class.controller # Initial request when user presses one of the button helpers (session_class.controller.params && !session_class.controller.params[:register_with_oauth].blank?) || # When the oauth provider responds and we made the initial request (oauth_response && session_class.controller.session && session_class.controller.session[:oauth_request_class] == self.class.name) end end
The error:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.params
/opt/local/lib/ruby/gems/1.8/gems/authlogic-oauth-1.0.8/lib/authlogic_oauth/acts_as_authentic.rb:85:inauthenticating_with_oauth?' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:178:in
send'Comments
-
Fix "undefined method `acts_as_authentic_config'" error when using rake
1 comment Created about 18 hours ago by joostReplace following in lib/authlogic_oauth.rb. See:
if defined?(Authlogic) # Fixes "undefined method `acts_as_authentic_config'" error when using rake. ActiveRecord::Base.send(:include, AuthlogicOauth::ActsAsAuthentic) Authlogic::Session::Base.send(:include, AuthlogicOauth::Session) ActionController::Base.helper AuthlogicOauth::Helper end
Comments
Truthfully, I've never tested authlogic_openid and authlogic_oauth in the same project, so that very well may be the case.
Can you post the contents of the controller action where the error is occurring? Just to give me a starting point.
Thanks!
Thanks very much for taking a look at this. I have a fairly typical authlogic UsersController with the following create action:
def create
end
Looks like you're spot on here. Unfortunately, I don't see an easy fix for this. I've sent an email to Ben at binarylogic (who developed authlogic and authlogic_openid) to see if he has any ideas.
For now, it looks like the two are incompatible. I'll update here if the situation improves.
Ok great, thanks! Meanwhile, is there an option for auto-registering the user if s/he does not exist in the database when logging in for the first time? That way my UserSessionsController could cover both the login and register workflows.
Not currently.
The downside to that is there wouldn't be anyway to capture other information from the user (such as any other required fields on the registration page).
I could add an option which allows that for the case where you only want to require the oauth token/secret for each user.