authlogic

Ruby on Rails: Adding a user for login to my existing app killed my index

I have an app that I've been developing that has so far only been a single user environment. I finally got to the point where I needed to add multi-user capabilities so I followed the railscast on authlogic to get a simple login. I then added a has_many :items and accepts_nested_attributes_for :items and a belongs_to :user to the corre...

Facebooker before_connect(facebook_session) causes http error with email

Hi, I am using the facebooker authlogic plugin. I have it working pretty well now. However, any attempt to set the email address in User.before_connect(facebook_session) is causing a Apache to throw the following error: Premature end of script headers: person_session, referer: (person_session is my user_session). Here is the code for...

configuring username format in authlogic

How can I configure username to only have alphabets (a-z, A-Z), numericals (0-9) and underscores (_) and no other characters... ...

validates_exclusion_of in Authlogic custom validations

Hi, I'm trying to use custom validations with Authlogic gem for Rails. In the method "acts_as_authentic" I'm just using some kind of validations such as "merge_validates_format_of", but now I'm trying to use "validates_exclusion_of" that's not working because there are only some of ActiveRecord validation methods implemented for Authlogi...

How can I test common Rails controller behavior while staying DRY?

I've been writing RSpec tests for some Rails controllers and I've discovered a strong impulse to ensure that the Authlogic authentication is working properly. I also feel like I should be verifying that each action uses the same application-wide layout. However, writing tests for this behavior in every single action seems silly. What I'...

Incrementing login_count with Authlogic

I'd like to have the login_count attribute increment each time the user enters my site via explicit login or remember me login. Currently Authlogic only increments login_count per explicit login. Has anyone else done this, or does anyone know where to customize this inside of the plugin? ...

Ruby on Rails: Best way to add Facebook login, Twitter login, OpenID login, etc.

I'm currently running on a Ruby on Rails app with Authlogic handling my authentication and user management. I'm struggling to find up to date information on the best way to add 3rd party login methods to my site, supplementing the standard sign up and login. There are a number of tutorials out there, but all seem to be outdated or inco...

Ruby on Rails: Adding Facebook login to existing Authlogic login

I have an existing site that is working well with Authlogic login. I'm trying to add Facebook login as an option, using the authlogic_facebook_connect plugin, but it's not working properly. I'm following the instructions located here: http://github.com/jbasdf/authlogic_facebook_connect On my registration form, I added the Facebook con...

optimistically save session in authlogic

I am trying to create similar functionality as this gem authlogix-rpx, which optimistically saves the session/user object even if some of the validated fields are missing. http://github.com/tardate/authlogic_rpx/tree/master/lib/authlogic_rpx (line 167) With this gem it's possible to create the record that does not meet validation crit...

Ruby on Rails: Is anyone using either Facebooker or authlogic_facebook_connect in a production setting?

I recently integrated authlogic_facebook_connect into my application. However, I've discovered that it seems to have some real problems with keeping track of user sessions, and even after logging someone out, the next person that logs in with Facebook will be logged in as the prior user. I found a fix for this, and manually integrated ...

logout should redirect to :back unless :back requires a user

When logout is clicked I want to redirect back to the page the user was on unless that page requires a user to be logged in. scenario 1 - "back" requires a user 1) User clicks logout from user account page 2) redirected (ultimately) to root_path scenario 2 - "back" does not require a user 1) User clicks logout from (not user required) ...

No details for authentication in Authlogic & Facebook Connect

After following the guide to add Facebook Connect to an Authlogic-enabled Rails app (see http://github.com/kalasjocke/authlogic_facebook_connect), I get the following error when I click on the Facebook's "Connect" button: You did not provide any details for authentication. It seems that UserSession.create(params[:user_session]) is tryi...

Using Ruby on Rail's Authlogic gem, how do I display the login form on all pages?

I followed the tutorial exactly: http://github.com/binarylogic/authlogic_example But I am wondering how can I get the login form to appear on all pages when someone isn't logged in? I searched Google and looked at many forums for answers, but the only solutions I could find require me to define @user_session = UserSession.new for every...

Authlogic: How to gracefully rename the default routes?

So Authlogic ships with some pretty confusingly (for an end user) named routes. For example, instead of /login/new, you get /user_session/new, and so on. Then, when a user can't login, the error message appears as "This user session could not be saved." It's a small thing, but that's just kind of... ugly, to me. What's a graceful way to...

authlogic current_user is nil

I have the standard current_user methods in my application_controller. def current_user_session return @current_user_session if defined? (@current_user_session) @current_user_session = UserSession.find end def current_user return @current_user if defined?(@current_user) @current_user = current...

Ruby on Rail's Authlogic gem - password confirmation only for password reset and the edit page

I followed the Authlogic example tutorial at github and have everything set up and running. But I would like to make a change concerning password confirmation. Following the tutorial, you must enter a password confirmation when registering. I don't want that to be necessary, so I put c.require_password_confirmation = false in the acts_a...

Rails 3 and Factory Girl creating user only if attributes are passed in

Hey, I'm using Rails 3 rc, Factory Girl, and Rspec, and Authlogic. Is there any way or reason why this would happen: When I create a user like this: @user = Factory(:user) I get an issue with password confirmation being "too short". my factories.rb is Factory.define :user do |u| u.username "Test User" u.email "...

rspec not receiving save method

Hello all, I'm very new to rails and I've been following a lot of great tutorials and examples out there in the community, so first off thank you! I'm having a problem with my test code. The application works, and I can see from tailing the test logs that the database is being written, but for some reason, it's not returning the save ...

Authlogic can't find user

I am integrating facebook connect with my application which uses authlogic, facebooker, and the authlogic_facebook_connect plugin. After I log in with facebook, I get redirected to the front page of the site (as per my code) - but the page never loads! - it hangs. Looking at the development log, I see that something is continuously tryin...

I have a Rails app and need to implement a "universal" or "skeleton key" password using AuthLogic

I have the AuthLogic plugin installed in my RoR app. I not creating an app that needs to be high security. But I would like it if admins can log in as a particular user without having to know each and every one of their passwords. I cannot find where AuthLogic actually validates the entered password upon login. Anyone have any recomme...