Questions tagged [authlogic]

Authlogic is a clean, simple, and unobtrusive ruby authentication solution.

718 questions
3
votes
2 answers

Optional Password Confirmation Authlogic

Is it possible to have AuthLogic validate a password confirmation if present, but otherwise ignore it? So, if my params are as following I'd like a failure: { user: { password: "abcd", password_confirmation: "defg" } However if the parameters are…
Stussa
  • 3,375
  • 3
  • 24
  • 35
3
votes
1 answer

Migrating user records and crypted passwords from Devise to Authlogic

Does anyone have any experience migrating from Devise to Authlogic, specifically when it comes to dealing with the crypted password? I currently use bcrypt in Devise and will also use bcrypt in Authlogic.
user344525
  • 41
  • 3
3
votes
1 answer

undefined method `setup' for main:Object while trying to run controller tests with authlogic

I am a little new to RSpec tests and i am trying to run some controller tests in my Rails 3 application using RSpec 2 and Authlogic 3 authentication. Following the steps provided by Authlogic documentation…
klidebharrow
  • 157
  • 1
  • 1
  • 8
3
votes
1 answer

Rails 3 Notices don't work when using Redirect_To

I've got some code I have a :notice, which is only showing up selectively. Here's the code respond_to do |format| if @userhj.save format.html { redirect_to(:action => :index, :notice => 'Succesfully assigned job') } format.xml { render…
CCSab
  • 1,455
  • 3
  • 16
  • 27
3
votes
3 answers

Does the User model need :password and :password_confirmation to be set as attr_accesible in authlogic?

I've been trying to setup Authlogic for the first time but I'm confused. I have set it up as per the example in the authlogic_example code however it doesn't appear to run: u = User.new(:password=>'testpass', :password_confirmation =>…
Peter Nixey
  • 16,187
  • 14
  • 79
  • 133
3
votes
2 answers

Testing @current_user method using RSpec

I've been trying to do this for a couple of days now, but I can't figure it out. I have the following code in my controller: @some_object = @current_user.some_method In my spec, I want to attach a should_receive hook on that method, but I can't…
Ronze
  • 1,544
  • 2
  • 18
  • 33
3
votes
1 answer

How do I write an rspec test in Rails 3 to test if a user is signed with authlogic after being created?

I'm porting my app from a custom authentication mechanism to authlogic and I'm having trouble figuring out how to test that a new user is logged in after it is created. My old test was the following: describe UsersController do . . . before(:each)…
spinlock
  • 3,737
  • 4
  • 35
  • 46
3
votes
3 answers

Rails 3 app doesn't redirect after AJAX form submission

I have an Authlogic login form with :remote => true that does a little inline validation with an RJS template if the user/password isn't valid. This works fine, but when the credentials are valid, it doesn't properly redirect elsewhere. Here's the…
Devin
  • 851
  • 12
  • 32
3
votes
1 answer

What is a short history of Ruby on Rails log in system?

Does any one know of a brief history of Ruby on Rails log in system? As far as I know, there are 5: write everything yourself (with or without Rails' session) Acts_as_Authenticated written by the same person who wrote Restful Authentication, but…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
3
votes
1 answer

Authlogic automatic logout on timeout

I am using the Authlogic gem in my application, and I need users to be logged out automatically after 15 minutes of inactivity. Can somebody tell me how to do this?
el_quick
  • 4,656
  • 11
  • 45
  • 53
3
votes
1 answer

updating authlogic not recognizing old previous passwords

I was using authlogic 3.0.0 when using rails 3.2.2. Now i have updated rails version to 5.1.4. And authlogic upgraded to 4.0.1. Now all of my previously saved passwords are not recognizing by authlogic. It says invalid password. So i have to update…
Zia Qamar
  • 1,694
  • 1
  • 15
  • 35
3
votes
2 answers

How do I force an SSL connection with Rails 3, but only when a user is logged in?

I'm creating a Rails 3 site that allows a company to update some of its web pages, and I've used AuthLogic to take care of logging users & out. For most traffic to our site, we don't need to use any encryption because we're not transmitting…
Ben Coppock
  • 939
  • 11
  • 23
3
votes
1 answer

Ruby on Rails: Authlogic Facebook integration: Link accounts with user input instead of automatically using email address

I'm developing a web app in Ruby on Rails. I'm using authlogic to do authentication. My site has its own logins, but I'm hoping to also use Facebook. I tried out authlogic_facebook_connect (using Facebooker). After a lot of hiccups (the docs haven't…
DavidH
  • 1,420
  • 1
  • 14
  • 25
3
votes
2 answers

AuthLogic + PostgreSQL 8.4: persistence_token defined as a string, then used as integer

I'm trying to integrate AuthLogic into my rails application, and I followed the example which defines persistence_token as a string : https://github.com/binarylogic/authlogic_example However when I run it with PostgreSQL 8.4 on my ubuntu desktop I…
3
votes
2 answers

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…
ben
  • 29,229
  • 42
  • 124
  • 179