{"id":14955720,"url":"https://github.com/thadeu/rails-automaticlogout","last_synced_at":"2025-10-08T18:07:01.748Z","repository":{"id":56890449,"uuid":"76055416","full_name":"thadeu/rails-automaticlogout","owner":"thadeu","description":"❤️  Provides automatic session timeout in a Rails application.","archived":false,"fork":false,"pushed_at":"2017-04-20T21:03:02.000Z","size":25,"stargazers_count":11,"open_issues_count":4,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-28T11:57:15.813Z","etag":null,"topics":["devise","rails-application","rails-automatic-logout","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thadeu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-09T17:18:43.000Z","updated_at":"2021-11-23T22:26:55.000Z","dependencies_parsed_at":"2022-08-21T00:20:29.547Z","dependency_job_id":null,"html_url":"https://github.com/thadeu/rails-automaticlogout","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/thadeu/rails-automaticlogout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Frails-automaticlogout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Frails-automaticlogout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Frails-automaticlogout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Frails-automaticlogout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thadeu","download_url":"https://codeload.github.com/thadeu/rails-automaticlogout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Frails-automaticlogout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273397756,"owners_count":25098233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devise","rails-application","rails-automatic-logout","ruby"],"created_at":"2024-09-24T13:11:37.323Z","updated_at":"2025-10-08T18:06:56.693Z","avatar_url":"https://github.com/thadeu.png","language":"Ruby","readme":"# Rails Automatic Logout\nBy Thadeu Esteves Jr.\n\n[![Gem Version](https://badge.fury.io/rb/rails-automaticlogout.png)](https://badge.fury.io/rb/rails-automaticlogout)\n[![Code Climate](https://codeclimate.com/github/Thadeu/rails-automaticlogout/badges/gpa.svg)](https://codeclimate.com/github/Thadeu/rails-automaticlogout)\n\nProvides automatic session timeout in a Rails application. Very easy to install and configure. Have you ever wanted to force your users off your app if they go idle for a certain period of time? Many online banking sites use this technique. If your app is used on any kind of public computer system, this plugin is a necessity.\n\n* Force your users power off session\n* show for they the regressive time\n\n## Getting started\n\nRails Automatic Logout works only Rails 4. You can add it to your Gemfile with:\n\n```ruby\ngem 'rails-automaticlogout', '~\u003e 0.1'\n```\n\nThen run bundle install\n\n## How to use?\n\n### Configure Controller\n\nAfter installing, add in your application controller, _ex:_\n\n```ruby\nclass ApplicationController \u003c ActionController::Base\n  before_action :authenticate_user!\n\n  # by default is time 1.hour\n  automatic_logout_at\nend\n```\n\nBy default the time is _1.hour_\n\n#### Change timeout value.\n\n```ruby\nclass ApplicationController \u003c ActionController::Base\n  before_action :authenticate_user!\n\n  # by default is time 1.hour\n  automatic_logout_at time: 5.minutes\nend\n```\n\n#### Change message\n\n```ruby\nclass ApplicationController \u003c ActionController::Base\n  before_action :authenticate_user!\n\n  # by default is time 1.hour\n  automatic_logout_at time: 12.hour,\n                      message: 'Session expired! You will be redirect.'\nend\n```\n\n### Configure Javascript\nAdd in your application.js this require\n\n```javascript\n//= require automatic_logout\n```\n### Configure View (OPTIONAL)\n\nUse Helper in your view, for show regressive timer. Add this in your file application.html.erb\n\n```ruby\n\u003c%= regressive_timer %\u003e\n```\n\n## TODO\n* Add translations\n* Add configurations for action_view\n* Add Suport for Rails 5.x\n* Setup test environment\n* Add Tests\n* Integrate automatic verification services (Travis-CI, Hakiri, CodeClimate, etc)\n\n\n## Contributing\n\nWe have a long list of valued contributors. Check them all at: https://github.com/Thadeu/rails-automaticlogout.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthadeu%2Frails-automaticlogout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthadeu%2Frails-automaticlogout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthadeu%2Frails-automaticlogout/lists"}