Reputation: 4861
How can I see the active sessions on my server? Is there a session table? I can't find it even if I do psql
but from my reading there appears to be one. (docs and article)
I'm running Rails 5
Upvotes: 0
Views: 2939
Reputation: 101811
Rails uses ActionDispatch::Session::CookieStore
storage by default. Where the session is simply stored in an encrypted cookie on the client. The client passes the cookies back with each request and the rails unencrypts the cookie and populations the session hash.
How can I see the active sessions on my server?
You can't. The cookies are stored in the client. The server does not keep track of the clients that it issues cookies to. You would have to change to a different session storage which stores the session server side which is much slower.
There are several gems such as Active Record Session Store which was removed in Rails 4 which provide server side session storage.
But this is most likely not a good fix for the problem you are actually trying to solve as they also rely on a cookie to tie the client to a server side session storage.
Upvotes: 1