authlogic

Authlogic: Setting expiration date for cookies

Is there a way to set the expiration date for the session cookies created by Authlogic? ...

authlogic require user

I use authlogic for authentication and certain actions require a logged in user, which is controlled via a before_filter like the following. I also use friendly_id on the User model and internally everything there is a look up on the User model there are queries to the friendly_id slug table too. This results in at least 3 queries for ce...

Authlogic Rails 3

I am having a weird issue with Authlogic in Rails 3. I followed this how-to here but I get: NoMethodError in PeopleController#my undefined method `login_field' for Object:Class app/controllers/application_controller.rb:33:in `current_session' app/controllers/application_controller.rb:39:in `current_user' app/controllers/application_c...

How to install authlogic in Rails 3 ?

I find that the the config/environment.rb file looks different in Rails version 3.0. Also when i add the line "config.gem "authlogic".To environment.rb file ...

session generator not working for Authlogic in Rails 3.Help me out !!

I installed authlogic and created a signup mechanism.And for creating a sign in mechanism I tried to generate the session controlers as below but rails 3 throws error as follows. How do I create the user_session and proceed with authlogic in rails 3 ? :~/work_space/rails_apps/sample_authentication$ rails generate session user_session ...

Rails ActionMailer methods confusion

I implemented an authentication system using authlogic, and have added password reset functionality as per this tutorial http://github.com/rejeep/authlogic-password-reset-tutorial It all works, but I am confused as to why it does.. There is this code.. class User < ActiveRecord::Base def deliver_password_reset_instructions! rese...

Authlogic - separate tables for users and sessions

Hi all, I'm implementing Authlogic and attempting something i haven't done before. I basically have two tables: account_holder: this has all the standard columns you'd expect...email, crypted_password, etc. session: this has account_holder_id, persistence_token, last_request_at, last_login_at, etc. Basically i was hoping to store a...

Authlogic + Rails3 - undefined method `Login' for nil:NilClass

Im new to Rails, and decided to start of with Rails3. After a lot of searching ive managed to get a little bit of Authlogic working. I'm able to register a user, login & logout. Now, I would like to add more features, get more of authlogic working. I'm using Railscast EP 160 as my reference. Portions of the code found on the tutorial t...

Authlogic, rails3_acts_as_paranoid and validates_uniqueness_of :login + default_scope(:conditions => {:active => true})

I want to be able to create multiple user accounts with the same login (because of the case a user deletes his account... and then sign up with the same login). I am using authlogic and rails3_acts_as_paranoid. But there is a problem: Authlogic validates the uniqueness of the login field - and IGNORES the default_scope(:conditions => {:...

Authenticating a user after #create

This seems to keep coming up for me on various projects and I'm wondering if anyone out there has a great solution: We have a Rails app with Authlogic authentication. Initially, there's a nice, clean, RESTful ListingsController that requires a user to be logged in before they can post/create: before_filter :require_user, :only => [ :ne...

Can someone please explain this line of code from a tutorial on how to reset a password with Authlogic?

I'm doing this tutorial on how to reset a forgotten password. It all works, except there's just an empty line in the email where the URL is supposed to be that will take you to the page to reset the password. The line where it should be added doesn't really make sense to me. I can't work out what edit_password_reset_url(user.perishable_t...

Passenger, Rails3, Authlogic

I'm having trouble with the Authlogic-gem. Before I write my own auth-scheme I wanted to ask if anyone had the same problem: When logging in it successfully executes the user_session.save and redirects, but the "current_user" is not set. It works perfectly locally, but it won't when using Passenger. I updated Passenger to 3.0 but no lu...

In Authlogic, how can force previous login invalid

EX: Login as A in computer A, then login as A in computer B Now in computer A, call current_user should return nil How can achieve this? Thanks a lot ...

How can I authenticate with an existing LDAP server with authlogic_ldap using Rails?

I am working on a corporate intranet site and need users to be authenticated prior to using the rails application. I have experience using auth_logic, but in this case I don't care about creating/editing/deleting users, simply authenticating them. I found that Ruby Toolbox (http://ruby-toolbox.com/categories/ldap.html#binarylogic_aut...

Customize Facebook url in Authlogic-connect

I'm using Authlogic Connect for Authlogic and I can't figure out how to customize the facebook url. By default it sets the display param to page display=page and I want to have it set to page=popup. I've been stepping through the code but I haven't been able to figure it out. Any ideas on how to customize it? ...

Is Authlogic viable on Rails 3?

I am looking for a good authentication solution. Is Authlogic the way to go for Rails 3? I am having problems and finding a lot of info that others are as well with Rails 3. Should I look at something else? ...

I've been using Authlogic, but now need to remove all traces of it. What do I need to do?

So I'm going to switch from Authlogic to Devise. Since I only have a couple of test accounts, I thought it would be best to simply remove all the Authlogic stuff and my users table, then setup Devise. I'm using Rails 3. Apart from removing authlogic from my gemfile, removing the user and user_session models/tables, is there anything else...

How to clear the password fill on registration/sign up error with authlogic?

I'm using Ruby 1.8.7, Rails 2.3.8, and using Authlogic 2.1.6 for registration, login, logout. In fact, those three things are nearly all I've done! During registration, if the user has errors in their registration information, I want the password and password_confirmation fields to be empty when the view is redrawn. I assumed one could...

How do I test logout/signout (UserSessionsController destroy action) when using Authlogic?

I was writing an rspec test for the destroy action of my sessions controller (Authlogic 2.1.6). I can't puzzle out what method I should call, either on the user object or the session object to determine whether the session is still "alive" (that is, that the user is or is not logged in). My first instinct was to use @user.logged_in? bu...