Questions tagged [authlogic]

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

718 questions
2
votes
3 answers

Can't log in with a valid password using Authlogic and Ruby on Rails?

We support a bit of an unusual scheme. We don't require a password on User creation, and use password_resets to add a password to the user later, on demand. The problem is, once a password is created, the console indicates the password is…
kbighorse
  • 389
  • 1
  • 2
  • 15
2
votes
3 answers

Authlogic validation order

guys. I have a problem when doing the authlogic login validation. I have the magical "active" field in the user model, say if active is false, when login with correct password, it will pop up the message like "You are suspended, please contact your…
Jimmy Huang
  • 4,252
  • 2
  • 22
  • 22
2
votes
1 answer

How to check if helper method/variable exists in rspec?

Im still trying to figure out rspec and right now I am using authlogic to handle my users and sessions. I did the usual authlogic stuff like adding the def current_user method to applciation controller, and as a helper method, but how do I access…
corroded
  • 21,406
  • 19
  • 83
  • 132
2
votes
2 answers

How do I set a message in the flash when authlogic times out a user?

I have a rails app which uses authlogic for authentication. I have a 60 minute timeout set. When a session times out the user is taken back to a basic login screen but there is no explanation given for why they have been logged out. Is there a way…
brad
  • 9,573
  • 12
  • 62
  • 89
2
votes
3 answers

Prevent Authlogic from establishing a session/cookie for non-HTML requests

I'm using Authlogic and Rails 3. On top of the regular browser-based user experience (logging in via form and whatnot), I'd like to implement an API. Authlogic seems to support single access tokens that don't persist by default. I supply them by…
Steven
  • 17,796
  • 13
  • 66
  • 118
2
votes
1 answer

After create, set role

I'm trying to use an after_create to set the default user role to subscriber. But it doesn't appear to make any changes. The roles of the new user is always [" " ]. User Model class User < ActiveRecord::Base acts_as_authentic after_create…
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
2
votes
1 answer

CasperJS + Authlogic (Rails) - maintain login session between tests

I have a single-page app that has a Ruby on Rails backend and uses Authlogic to facilitate user authentication. I am implementing functional testing using CasperJS and am having a hard time getting login sessions to persist between sessions but…
tommybond
  • 650
  • 6
  • 19
2
votes
1 answer

Unable to set carrier

I'm trying to set the carrier for my new users but when i submit i get this errorr Carrier(#37295244) expected, got String(#15496392)
<%= f.label :carrier %>
<%= f.collection_select(:carrier,…
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
2
votes
3 answers

Unable to delete record, user

I'm trying to delete using the delete action. But whenever I go click the link i just goes to the users profile. User Controller class UsersController < ApplicationController filter_resource_access # GET /users # GET /users.xml def index …
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
2
votes
1 answer

Rails - Checkbox not working with Remember Me for Authlogic?

So I have been using Authlogic to allow user account creation and authentication. I have most of the features I want for the user but I am currently running into trouble regarding the "remember_me" function. I have a check box to indicate whether…
VectorConvoy
  • 187
  • 1
  • 4
  • 14
2
votes
0 answers

Rails: Authlogic & User Sessions & Callbacks

I want to call a service to find location data every time the current_login_ip on a user changes. Now, one way to implement this would be to do class User #... after_save :kickoff_job_to_find_location, if:…
patrickdavey
  • 1,966
  • 2
  • 18
  • 25
2
votes
1 answer

Not able to set a current_user using Authlogic on Rails 3.0.1

I had the official authlogic plugin running perfectly on Rails 2.3.5. I converted my application to Rails 3.0.1 and now I'm having some problems. I've included the following authlogic gem in my gemfile gem 'authlogic', :git =>…
Tim
  • 1,441
  • 2
  • 15
  • 23
2
votes
1 answer

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,…
Iain
  • 985
  • 2
  • 9
  • 20
2
votes
0 answers

Using Authlogic in a non-Rails environment

What would be the best way to use Authlogic in a non-Rails environment? In other words, how to validate credentials from within a Ruby script? When run from console, self refers to a "main" Object, hence Authlogic initialization is pointless: 2.3.1…
Tonči D.
  • 456
  • 4
  • 14
2
votes
2 answers

Adding Javascript effects to a form in RoR

Hopefully I can be clear on my issue. If you need more clarification on what I mean, please let me know and I'll try to clear up anything I can. I am currently working on a simple Ruby on Rails project and I want to add some interactivity to my…
Fizz
  • 3,427
  • 4
  • 27
  • 43