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

authlogic_facebook_connect breaks authlogic-oauth #17

Closed
joelmahoney opened this issue Apr 9, 2010 · 3 comments
Closed

authlogic_facebook_connect breaks authlogic-oauth #17

joelmahoney opened this issue Apr 9, 2010 · 3 comments

Comments

@joelmahoney
Copy link

after installing the authlogic_facebook_connect plugin, the oauth login with Twitter method no longer works. the error originates at authlogic_facebook_connect/lib/authlogic_facebook_connect/session.rb:132:in `authenticating_with_facebook_connect?'

here's the error:
NoMethodError in User sessionsController#create
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+

here's the stack trace:
/opt/local/lib/ruby/gems/1.8/gems/facebooker-1.0.67/lib/facebooker/rails/controller.rb:125:in fb_cookie_prefix' /opt/local/lib/ruby/gems/1.8/gems/facebooker-1.0.67/lib/facebooker/rails/controller.rb:129:infb_cookie_names'
/opt/local/lib/ruby/gems/1.8/gems/facebooker-1.0.67/lib/facebooker/rails/controller.rb:129:in select' /opt/local/lib/ruby/gems/1.8/gems/facebooker-1.0.67/lib/facebooker/rails/controller.rb:129:infb_cookie_names'
/opt/local/lib/ruby/gems/1.8/gems/facebooker-1.0.67/lib/facebooker/rails/controller.rb:135:in secure_with_cookies!' /opt/local/lib/ruby/gems/1.8/gems/facebooker-1.0.67/lib/facebooker/rails/controller.rb:30:increate_facebook_session'
/opt/local/lib/ruby/gems/1.8/gems/facebooker-1.0.67/lib/facebooker/rails/controller.rb:44:in set_facebook_session' /opt/local/lib/ruby/gems/1.8/gems/authlogic-2.1.3/lib/authlogic/controller_adapters/abstract_adapter.rb:63:insend'
/opt/local/lib/ruby/gems/1.8/gems/authlogic-2.1.3/lib/authlogic/controller_adapters/abstract_adapter.rb:63:in method_missing' path_to_my_app/vendor/plugins/authlogic_facebook_connect/lib/authlogic_facebook_connect/session.rb:132:inauthenticating_with_facebook_connect?'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:178:in send' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:178:inevaluate_method'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:195:in should_run_callback?' /opt/local/lib/ruby/gems/1.8/gems/authlogic-2.1.3/lib/authlogic/session/password.rb:127:inall?'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:195:in each' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:195:inall?'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:195:in should_run_callback?' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:166:incall'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:93:in run' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:ineach'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:in send' /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:inrun'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:276:in run_callbacks' /opt/local/lib/ruby/gems/1.8/gems/authlogic-2.1.3/lib/authlogic/session/callbacks.rb:72:invalidate'
/opt/local/lib/ruby/gems/1.8/gems/authlogic-2.1.3/lib/authlogic/session/validation.rb:64:in valid?' /opt/local/lib/ruby/gems/1.8/gems/authlogic-2.1.3/lib/authlogic/session/existence.rb:65:insave'
/opt/local/lib/ruby/gems/1.8/gems/authlogic-oauth-1.0.8/lib/authlogic_oauth/session.rb:46:in save' path_to_my_app/app/controllers/user_sessions_controller.rb:15:increate'

any suggestions?

@agibralter
Copy link

I think I ran into something similar. My fork has a hook so that you can turn on/off facebook login: http://github.com/agibralter/authlogic_facebook_connect/commit/9758277409849f8282f096f55c22ba8cd17c149d

Here is an example of how I use it: http://gist.github.com/360833

@marcandre
Copy link

I believe it is because of a bad design decision of auth_logic itself.
See http://github.com/binarylogic/authlogic/issues#issue/58 (and vote it up or comment!)

@joelmahoney
Copy link
Author

I switched to http://github.com/jbasdf/authlogic_facebook_connect and everything worked fine (note that you need an additional User field compared with the kalasjocke version: add_column :users, :facebook_session_key, :string)

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

4 participants