NoamB/sorcery — Issue #180: auto_login not working
Author: northband
Created: 2011-12-29 19:08:50+00:00
State: open

Hi - I'm trying to get auto_login to work but for some reason no luck. Here's my code:

def activate
user = User.load_from_activation_token(params[:token])
if user
auto_login(user) # TODO does not work...
redirect_to(dashboard_url(:subdomain => user.subdomain), :notice => "#{user.name} your account was successfully activated.")
else
not_authenticated
end
end

Looking at the log there's no failed login attempts, etc... Its as if the method isn't being called. I'm also using the latest version as well.

Any help appreciated. For now I'll have my users login upon activation - however would be nicer if activation simply logs them in automatically.

Best,
Adam