David
David

Reputation: 123

session_id saved in session_store is different to request.session[:session_id]

Ruby 3.2.4, Rails 7.1.3.2, Postgres 14, Ubuntu 22.04.

gem 'activerecord-session_store'

initializer is as follows

Rails.application.config.session_store :active_record_store, :key => '_my_app_session'

The session id being stored in the database sessions table is

2::026c0fe81b8054c767dea472b0e5ac1f61dc3412b78bd88409c0f23845b03093

The session_id in request.session[:session_id] is

45eaf5901a0a50f003ba743a17e89c22

Why are they different? I need to be able to access the session record - how do I find out what the session_id in the sessions table is?

Upvotes: 1

Views: 23

Answers (0)

Related Questions