# Problem with Session ID

**URL:** <https://www.ruby-forum.com/t/problem-with-session-id/143239>\
**Category:** Rails\
**Created:** [July 16, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/problem-with-session-id/143239 "2008-07-16T17:53:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LAB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ba8739/32.png) [@LAB](https://www.ruby-forum.com/u/LAB)\
**Post date:** [July 16, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/problem-with-session-id/143239/1 "2008-07-16T17:53:16Z")

</div>

I am using the acts\_as\_authenticated plugin. When a user is  
activated, self.current\_user = @user, (I hesitate to say “logged\_in”,  
because that is a different action in the account controller), and are  
able to click around the site, until they go to one specific  
controller, and then the Session ID suddenly changes. They have to  
log back in, hitting the “login” action in the account controller.  
Once they are logged in this time, everything works perfectly and the  
Session ID does not change between the same controllers. I’m not sure  
how to track down how or why the Session ID is changing between  
controllers, only when the user is on the site after activation.

In my environments.rb file I am using  
config.action\_controller.session with a :session\_key and a :secret.  
It seems like the cookie is getting deleted between controllers, or  
the session is being reset.

Any ideas where I can look, as I am not very familiar with the session  
mechanism.

Thanks in advance!!  
LAB
