CODEX

User Session Inactivity Timeout with Rails and Devise

Jason Hee
CodeX

--

Photo by NeONBRAND on Unsplash

Recently, I have had to implement a feature on a Ruby on Rails application where I had to ensure the user session was expired after a period of inactivity. The application was using the Devise gem as the solution for user authentication.

Why do we need to expire user sessions?

--

--

Jason Hee
CodeX
Writer for

I’m a software engineer who loves tech