The rack-auth-cookie library provides a Rack middleware interface for authenticating users using a cookie
Daniel Berger, Charlie O'Keefe
gem "rack-auth-cookie", "~> 0.7.3"