Authlogic is a clean, simple, and unobtrusive ruby authentication solution.
Questions tagged [authlogic]
718 questions
2
votes
1 answer
Authlogic Create new session without password
I'm trying to build Facebook OAuth into my existing Authlogic login system. I have the OAuth part complete, and stored the facebook access_token. The problem I'm facing is to actually log the user in (create a session) without the user typing in…

porkeypop
- 324
- 2
- 11
2
votes
1 answer
Pitfalls of Thread.local[:current_user]
This question is related to: Access current_user in model.
Specifically, I want to enable access to current_user in one Model.rb. @moif left a comment stating that the solution is not thread-safe, and I have read that there are additional caveats to…

sscirrus
- 55,407
- 41
- 135
- 228
2
votes
1 answer
Is there any running example code for Google login with authlogic
PS:- please dont say use this devise, omniauth or any other plugin/gem you know.
I am looking for some example code for google login using authlogic for ruby on rails 3.
Here is what i have tried/checked:-
authlogic-google-account-oauth --- This is…

Mohit Jain
- 43,139
- 57
- 169
- 274
2
votes
2 answers
attr_accessor causes Rspec tests to fail
I've added a :username_or_email property to my User model as such:
class User < ActiveRecord::Base
#authlogic
acts_as_authentic do |c|
c.login_field = :username_or_email
end
#virtual field for allowing a user to login with their…

LandonSchropp
- 10,084
- 22
- 86
- 149
2
votes
1 answer
Best way to model users that have roles with differing attributes in Rails?
I'm a Rails noob and am hoping someone can help me wrap my head around this issue. I have an app that has a single User model using Authlogic for authentication and CanCan for authorization. There are three roles: Consumer, Business, and Admin. …

MikeH
- 796
- 7
- 18
2
votes
2 answers
Setting up Authlogic I keep hitting: "undefined method `login' for #"
I am trying (unsuccessfully) to setup Authlogic for my Rails3 project. In the user_sessions#new view, I keep getting the following error:
undefined method `login' for #
Extracted source (around line #7):
5: …

Peter Nixey
- 16,187
- 14
- 79
- 133
2
votes
0 answers
How to test user features using Authlogic_RPX and Steak?
I'm trying to test features of my Rails 3 app for which a user should be signed in.
I use authlogic_rpx for authenticating users through Facebook and Twitter, but I don't want to test that process. What I am looking for is to programmatically create…

martini-bonanza
- 1,515
- 3
- 18
- 33
2
votes
1 answer
authlogic with_scope not working on Rails 3 for multi account application
After updating to rails 3 authlogic does not work so i am using the gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3'
This works for the standard setup but i have a multi account setup and i used with_scope…

rick
- 463
- 5
- 23
2
votes
1 answer
Authlogic: turn off uniqueness constraint
We've been happily running Authlogic for our app for a while. Now, however, we would like to turn off the uniqueness constraint on emails when creating users. Is there a simple way to do this?
I was hoping for something like:
acts_as_authentic do…

Shailen Tuli
- 13,815
- 5
- 40
- 51
2
votes
3 answers
In Ruby on Rails, how secure is it to use User.find_by_id(session[:user_id]) to identify a user?
For example, Rails Restful Authentication uses
User.find_by_id(session[:user_id])
to find the user as the first try. So
If the session is stored only by the use of cookies (isn't this a Rails option of storing session info all by using just…

nonopolarity
- 146,324
- 131
- 460
- 740
2
votes
1 answer
Getting "undefined method `password' for #" with Authlogic
I realize there's a nearly identical question about this here but the fix there did not fix my problem.
My Authlogic is working in my development environment but not in my production environment. Below is the error I'm getting.
Started GET…

Jason Swett
- 43,526
- 67
- 220
- 351
2
votes
2 answers
Authlogic: How can I only validate the password if the password is being updated?
I'm using authlogic with rails 3. I have this in my user model:
validates :last_name, :presence => true
acts_as_authentic do |c|
c.validates_length_of_password_field_options = {:minimum => 7}
end
And then I have a controller action that…

James
- 5,273
- 10
- 51
- 76
2
votes
1 answer
Authlogic: How to block certain names and email addresses?
Using Authlogic, what's the proper way to ban certain usernames and domains (for email addresses)? The list if usernames and domains to block would be updated on an ongoing basis.
For instance, I don't want anyone to register with the username…

Shpigford
- 24,748
- 58
- 163
- 252
2
votes
1 answer
Not able to create session with an object
I'm trying to implement my first authlogic-based app in ruby on rails. I need to sign user using a custom oauth2 flow, at the end of the process, I want to tell authlogic which user I want him to authenticate. Without providing a login nor password,…

mbajur
- 4,406
- 5
- 49
- 79
2
votes
2 answers
undefined method `activated?'
I'm trying to implement Authlogic in Rails 3 and have just been having headache after headache...I'm extremely new to rails, so please forgive me for not being an expert. I followed the railscast on the subject which has been really helpful, but as…

Jamie
- 1,004
- 1
- 14
- 32