Questions tagged [session-store]

43 questions
14
votes
1 answer

Difference between session in file and in database

What is the difference between storing sessions in file and in database?
hd.
  • 17,596
  • 46
  • 115
  • 165
7
votes
2 answers

Clearing a Rails Session during Development

How do I clear the rails session so I can start with a fresh slate? I know I could just nullify each of the session variables with session[:my_var] = nil, but is there a rake task or something that knows how to restore the session data to its most…
Lance
  • 75,200
  • 93
  • 289
  • 503
5
votes
1 answer

Adding sessions and session_store back into a Rails 5 API (sessions not persisting)

I am attempting to set up a basic sessions-based authentication strategy in a Rails 5 API. I think I'm mostly running into a configuration confusion, because a new session is generated on each request. I've added the cookies and cookie store…
4
votes
1 answer

set up mssql-session-store in node.js

I'm trying to use mssql-session-store as nodejs (express) store for session: https://www.npmjs.com/package/mssql-session-store This is how it should be configured(from npm page): app.use(session({ secret: 'keyboard cat', resave:…
Guy E
  • 1,775
  • 2
  • 27
  • 55
3
votes
1 answer

Can't get an authorized user in integration test with Rails 3.1/Authlogic/ActiveRecord session store

I am trying to write a simple integration test on a Rails 3.1 application that uses Authlogic and ActiveRecord SessionStore, but I'm hitting the wall. First, I tried a classic approach: after ensuring that require "authlogic/test_case" line is…
3
votes
0 answers

How to delete a Rails (ActiveRecord) session at the end of a request

We use Rails with the devise and cancancan gems. Our user sessions are stored using ActiveRecord SessionStore. In our front end (JavaScript) code we have recently started to use web workers to do Ajax requests to our backend. This means that these…
2
votes
1 answer

How to use redis store in express session using connect-redis?

I am trying to look for a tutorial that explains your how to setup user session in redis store using express session. I know how to set it up, but I could not find out how to access redis store and how to store and retrieve values from that redis…
WOW
  • 63
  • 1
  • 6
2
votes
3 answers

Rails how to use an in Memory SessionStore

I'm looking for a way to use an in memory based session store in a Ruby on Rails application. The session contains a masterkey which can only be decrypted when the users logs in. This key should be available during the entire session. Due to the…
rkokkelk
  • 146
  • 1
  • 8
2
votes
1 answer

NoMethodError: undefined method `delete' for nil:NilClass; Rails 3.2.21, Spree 2.0.13.beta; using Active Record Session store

I am seeing an unusual hiccup related to Active Record Session store that happens intermittantly (and I am unable to reproduce locally): NoMethodError: undefined method `delete' for nil:NilClass Rails: 3.2.21 I am using active_record_store and the…
1
vote
1 answer

How to persist the session in Rails before the end of request?

I'm using Rails 2.3 and ActiveRecord as session store and I want to avoid creating sessions before it is needed. I have a Itens table to store items associated to the session, ie, its model has an association belongs_to :session. I have an Ajax call…
GuiGS
  • 2,070
  • 1
  • 19
  • 18
1
vote
1 answer

Keeping Existing Sessions When Upgrading to Rails 5.2 (with Redis Session Store)

I have recently finished a big upgrade of a Rails application. I took the App incrementally from Rails 4.2.8 to Rails 5.2.3. Everything has gone smoothly, all our automated tests are passing, and we've begun user acceptance testing. So far the only…
1
vote
1 answer

Express-session - Concurrent modifications on session

I'm implementing a session-based services using expressjs and express-session with the redis-connect store in nodejs and I have a problem with the concurrent modifications on session storage. Find following an example of the problem: Two routes…
Albert
  • 15
  • 2
1
vote
1 answer

How to implement session with express-session?

I’m considering using session in my node.js application. I understand the following: - session-cookie use cookie to save session data on the client side - express-session use cookie to store a sessionID and all the session data are stored on the…
1
vote
2 answers

Share Session between subdomains, devise authentication Completed 401 Unauthorized

I have 2 ruby rails apps, each has a devise gem for authentication, my goal is to implement simple SSO (single sign-out), using shared sessions. one of them with public.admin.com and the other with private.admin.com I am using the following…
1
vote
2 answers

Rails: ActionController::InvalidAuthenticityToken appears when changing to active_record_store

I just changed my session_store to active_record_store. I did the rake command for db:sessions:create and db:migration, but now I get the following issue, as soon as I try to log in. ActionController::InvalidAuthenticityToken How to solve this…
Markus
  • 3,948
  • 8
  • 48
  • 64
1
2 3