I'm switching my session store from :cookie_store to :active_record_store. I've noticed when I first tried to log in I received an ActionController::InvalidAuthenticityToken. I'm guessing this is because of the cookie that exists on my computer from the old cookie_store? After I removed it from my chrome browser settings I was able to log in fine. I'd like to have a seemless way to keep all of my users from having to delete their cookies before they can log in correctly. But how would I do this?
How to prevent InvalidAuthenticityToken Exception when switching from :cookie_store to :active_record_store?
389 views Asked by daveomcd At
0
There are 0 answers
Related Questions in RUBY-ON-RAILS
- How to display legend box in tooltip text for amCharts 5 in Rails application?
- how to integrate cashfree payment gateway in ruby on rails project
- RSpec Capybara throwing Selenium error when trying to click a button with browser confirm
- rails minitest not picking up fixture properly, instance variable not percolating
- Duplicate GET requests - Rails & Heroku
- How to stub out current_user in JWT model for Rspec?
- NameError in Home#index
- Verifying Google Identity OAuth2 token with Ruby
- Error WebMock::NetConnectNotAllowedError in testing with stub using minitest in rails (using Faraday)
- why is mission_control-jobs erroring with load path error?
- Rescuing validation errors from a polymorphic association
- New error on random number assigned to local variable , Rails
- How to fix error in model with gem lockbox
- Images uploaded via Active Storage not displaying in Active Admin or on certain devices
- controller test_methods generating two errors intermittently
Related Questions in COOKIES
- Loading Google Analytics after the user consents to cookie usage
- Express session is not seened in server code
- Cookie doesn't send different domain django and react
- Storing settings in cookies
- Cant handle Session's cookie when Safari/iOS
- Create new cookie with host only set to false in chrome extension
- 3rd Party cookies error on deployment server
- Access Cookies in TRPC fetch handler
- My project uses cookiebot but when I accept cookies at the start of website it deletes my localstorage data
- Postman receiving cookie but my browser isn't receiving it when I try
- Nextjs: Ability to fetch HTTPS-ONLY cookies using server actions, is there a vulnerability?
- Cant send cookie at res when user using Safari/iOS
- Initialize a singleton from cookies for a ASP.NET Core Razor project
- JS doesn't put cookies after domain change for localhost
- Unable to set cookies from hosted backend (https://dev.abcd.com) to localhost of frontend
Related Questions in ACTIVERECORD
- Rails 5 does not reference a modified ActiveRecord-jdbc-adapter
- Showing currently selected field in a separate textbox in Access
- Rails Active Record Statement Invalid Undefined column
- RSpec test failing because of file field
- Use update_all for store in Rails
- Ruby on Rails Active Storage (bug?)
- Rails before_update not triggering on update but save works
- Rails/MySQL: better to use JSON column or serialized text for non-JSON use?
- ActiveRecord query for count of association using a join table
- SQL JOIN to SELECT - is there an ActiveRecord way to do this?
- How to prevent ActiveRecord from making an associated record in a callback before it is saved?
- Association within the same model?
- Drop index concurrently when testing Rails migration in Rspec
- How to add validation only to an associated table in active record
- Decrypting Fields Encrypted by Rails Active Record Encryptor in Plain Ruby
Related Questions in DEVISE
- Devise:Invitable redirecting me to sign_in
- uninitialized constant GraphqlDevise::SchemaPlugin from graphql_devise
- invitation_accepted? returns FALSE in after_invitation_accepted CALLBACK
- Error 401 Unauthozied when connecting to hybrid rails 7 using Devise-JWT
- How to Properly Implement API Authentication with Devise in Rails?
- Handling Devise Cookies as Secure over HTTP When Proxying Through Upstream SSL via AWS Gateway
- Issue with current_user in turbo_stream and broadcast
- Devise with only Omniauth: how only to use login page of the provider
- Weird Caching / Devise Issue - Have to restart server for user signup to work
- Migrate encrypted password using devise to another environment using devise but with different devise pepper while maintaining passwords
- Best strategy for Devise + Omniauth signin/up via API which doesn't provide email?
- Rails Validations with oauth2 and devise
- Ruby on Rails in last version isn't working with Wicked GEM
- Devise-related system tests fail when run en mass but they pass when run individually (Devise::Mailer)
- Insert parameters in a Devise controller
Related Questions in SESSION-STORE
- Is it possible to share a cookie between two rails application running on same domain but different subdomain
- Redis as Session_Store Doesn't Work But CookieStore Does after upgrading from Rails 5.1 to 7
- ROR SESSION STORE: Session store with :redis_store not getting cookie with session_id in it in response
- Rails Session Store + Redis: Can I set TTLS in redis without setting expiration on sessions?
- Express mysql session store with Typescript
- express.js - fetch data from mongostore efficiently
- How to handle MySQLStore connection error?
- How to share express sessions across subdomains?
- How to connect the express-session store with back4app?
- set up mssql-session-store in node.js
- Keeping Existing Sessions When Upgrading to Rails 5.2 (with Redis Session Store)
- Express-session - Concurrent modifications on session
- video to Window.sessionStorage
- How to implement session with express-session?
- Does using Redis as a session store will mitigate session replay attacks?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)