Hi all,
I'm trying to set up a simple login using AuthLogic into my User table. Every time I try, the login fails and I don't know why. I'm sure this is a simple error but I've been hitting a brick wall with it for a while.
#user_sessions_controller
def create
@user_session = UserSession.new(params[:user_session])
if @user_session.sa...
I think I am missing something while using the Authlogic gem w/ Rails. To set the stage I have multiple users and each user can create posts and comments. Upon the display of a post or comment I would like to give the user who created them the option to edit or destroy.
I am successfully using the following code to hide and show element...
Hi,
I am using rails 3.0.0.beta3 to implement authlogic and subdomain-fu. And, I have a problem with automatic login into subdomain after signup.
The scenario is :
I have a signup form where an account and an admin user for that account are created simultaneously. Each time a new account is created, a separate subdomain is assigned to...
I am in the early stages of building an app using Rails 3. User authentication is powered by Authlogic which I have setup pretty much as standard (as per the example docs) and everything is working as expected locally.
I have just deployed the app to a clean server install of Centos 5.4 / NginX / Passenger so staff can start to log in a...
I'm having difficulty getting OpenId authentication working with Authlogic. It appears that the problem arose with changes to the open_id_authentication plugin. From what I've read so far, one needs to switch from using gems to using plugins.
Here's what I done thus far to get Authlogic-OpenID integration working:
Removed relevant g...
Hi,
I have some models such as:
class User < ActiveRecord::Base
acts_as_authentic
end
class Admin < User
end
class Superadmin < Admin
end
And some controllers such as:
class UserSessionsController < ApplicationController
def new
@user_session = UserSession.new
end
def create
@user_session = UserSession.new(params[...
The authlogic rails gem is doing a LOWER in the sql query.
SELECT * FROM `users` WHERE (LOWER(`users`.email) = '[email protected]') LIMIT 1
I want to get rid of the LOWER part since it seems to be slowing down the query by quite a bit.
I'd prefer to just lower the case in the code since this query seems to be expensive.
I'm not sure w...
Hi everyone,
I set up AuthLogic for Rails according to the AuthLogic example: http://github.com/binarylogic/authlogic_example.
I can log on successfully to the system, but when accessing users/new.html.erb to register a new user, the form returns the following validation errors:
Email is too short (minimum is 6 characters)
Email shoul...
Hi all,
I have set up AuthLogic almost exactly as per the AuthLogic example app at http://github.com/binarylogic/authlogic_example.
After someone logs in as User, they can click on links that send them away into the system and away from the users controller. This is an incredibly noob question, but how can I access that User's ID and o...
Hi,
I have to run rails on a shared host for a client via cPanel.
The application is running on a subdomain and non standard port.
I am using Authlogic, so on the first visit it detects I am not logged in and I get a page with:
You are being redirected.
Clicking on that I get the login form, which then takes me to the target page, ...
I think I'm just missing something obvious. I send a user a perishable token embedded in a link. They click on it, and they come back to the site. I want to log them in automatically --- authenticated by their perishable token, not the password. (I'm not building a banking app).
This seems like this should be simple, but all the exampl...
In my User model I have:
acts_as_authentic do |c|
c.perishable_token_valid_for = 30.minutes
end
In my Application Controller I have the standard boilerplate code:
def current_user_session
return @current_user_session if defined?(@current_user_session)
@current_user_session = UserSession.find
end
def current_user
return @curr...
Using Authlogic and Authlogic Facebook Connect.
before_filter works great. Get name and facbook_uid saved in db. Only problem is that it saves a new record every time.
Need help figuring out how to build some type of find_by_facebook_uid_or_create_user
I have tried reading up on the API's for facebooker, but this is way over me. :(...
Hi everyone,
I have a system where I need to login three user types: customers, companies, and vendors from one login form on the home page.
I have created one User table that works according to AuthLogic's example app at http://github.com/binarylogic/authlogic_example. I have added a field called "User Type" that currently contains ei...
I am using the Authlogicgem for authentication and most of it seems to be working great. Authlogic provides several columns that you can add to your Users table (for example) that it knows to fill in if they are present. i.e. login_count, current_login_ip, last_request_at and last_login_at.
All seem to be working fine with the exceptio...
I am using authlogic (2.1.3) and declarative_authorization (0.4.1) to control access to my application.
All of the authorization works as expected except user's that are assigned the Editor role can't change their (the current_user supplied by authlogic) profile settings (a part of the User model).
The 'Guest' role works as expects, as...
I've began with a new project using Authlogic system for Authorization.
And I'm now wondering how could I connect Facebook oAuth sessions with my Authlogic session!
First of all I want to use and Authlogic-oAuth Gems/Plugins, I what I want to use are just
http://github.com/intridea/oauth2
and the interesting http://github.com/nsanta/...
So I followed the railscast tutorial (http://railscasts.com/episodes/170-openid-with-authlogic) and used the old version of the plugin from Ryan's git file. I can now successfuly create/register a user using OpenID (Google), but I cannot log in with this user. When I submit the OpenID that has been registered, I get "uninitialized consta...
I've been having almost the same issues as Victor Martin (you can see the questions asked here).
I've got declarative authorization working for just about everything that doesn't involve using conditionals. E.g.
has_permission_on :users, :to => [:edit, :update, :destroy] do
if_attribute :user => is { current_user }
end
Are there any ...
I want my user session to end when the user closes the browser. But authlogic seems to remember the session even when a new browser is opened. I have tried setting @user_session.remember_me = false but that doesn't help. I drilled down to the save_cookie method which is indeed saving the cookie with :expires => nil. Am I right in assumin...