{"id":22642600,"url":"https://github.com/zeffon/vue-auto-logout","last_synced_at":"2025-03-29T05:42:46.942Z","repository":{"id":46999550,"uuid":"397084217","full_name":"zeffon/vue-auto-logout","owner":"zeffon","description":"The vue project with login function will be automatically logged out of the system if it has not been operated for a long time.","archived":false,"fork":false,"pushed_at":"2021-12-23T06:27:50.000Z","size":952,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T04:11:43.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zeffon.png","metadata":{"files":{"readme":"README-en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-17T03:42:55.000Z","updated_at":"2022-08-24T06:43:06.000Z","dependencies_parsed_at":"2022-07-21T06:18:14.873Z","dependency_job_id":null,"html_url":"https://github.com/zeffon/vue-auto-logout","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeffon%2Fvue-auto-logout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeffon%2Fvue-auto-logout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeffon%2Fvue-auto-logout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeffon%2Fvue-auto-logout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeffon","download_url":"https://codeload.github.com/zeffon/vue-auto-logout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246145016,"owners_count":20730493,"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","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":[],"created_at":"2024-12-09T05:07:33.133Z","updated_at":"2025-03-29T05:42:46.897Z","avatar_url":"https://github.com/zeffon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [简体中文](./README.md)\n\n# vue-auto-logout [![NPM version](https://img.shields.io/npm/v/vue-auto-logout.svg?style=flat)](https://npmjs.org/package/vue-auto-logout)\n\n## Project\n\nThe `vue` project with login function will be automatically logged out of the system if it has not been operated for a long time.The conditions are as follows:\n\n1. The `Vue` project of the `Web on the PC side`\n2. The system has a permission mechanism related to the `login function`\n3. The login identifiers such as `token` are stored in the `browser arbitrary cache`\n\n## Install\n\n```bash\n$ npm install vue-auto-logout\nor\n$ yarn add vue-auto-logout -S\n```\n\n## Usage\n\nmain.js:\n\n```js\nimport { createApp } from 'vue'\nimport App from './app'\nimport logoutPlugin from 'vue-auto-logout'\n\nconst app = createApp(App)\nconst logoutOptions = {\n  stagnateTime: 30 * 60 * 1000,\n  detectTime: 30 * 60\n}\napp.use(logoutPlugin, logoutOptions)\napp.mount('#app')\n```\n\n## Logout Options\n\n| key | description | default | options |\n| :-- | --- | --- | --- |\n| `enable` | Turn on automatic logout | `true` | `Boolean` |\n| `keyName` | The `key` name of the `token` in the cache | `token` | `String` |\n| `clearAll` | Whether to clear all cached values ​​under this site | `true` | `Boolean` |\n| `stagnateTime` | No operation dead time | `30min` | `Number` |\n| `detectTime` | How many seconds to check whether to log out | `10s` | `Number` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeffon%2Fvue-auto-logout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeffon%2Fvue-auto-logout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeffon%2Fvue-auto-logout/lists"}