Skip to content

Latest commit

 

History

History
131 lines (89 loc) · 3.9 KB

File metadata and controls

131 lines (89 loc) · 3.9 KB

AutoLogout

GitHub Release License: MIT Platform

AutoLogout is a lightweight desktop utility that helps secure shared workstations by clearing local web sessions and closing selected applications when a user leaves.

Highlights

  • No admin rights required (user-level actions only)
  • Portable-friendly (runs directly with Python, optional one-file build)
  • Simple UI with a single main action: Log out now
  • Automatic triggers:
    • App close
    • Windows sign-out events
    • Idle timer
  • Browser session cleanup:
    • Chrome, Edge, Firefox
    • Preserves saved passwords
  • Optional Dashlane-preserve mode to avoid full extension re-login
  • Rotating action log for audit/troubleshooting

How It Works

  1. Close target user applications (Discord, Steam, etc.).
  2. Close browser processes (Chrome, Edge, Firefox).
  3. Remove browser session artifacts (cookies/session/local tokens).
  4. Apply provider-focused cleanup:
    • Chrome: stronger local Google account token cleanup
    • Edge: stronger local Microsoft account token cleanup

Project Structure

  • app.py: Tkinter desktop UI and app lifecycle
  • auto_logout/orchestrator.py: cleanup pipeline orchestration
  • auto_logout/browser_cleanup.py: browser data cleanup logic
  • auto_logout/app_cleanup.py: selected app cleanup
  • auto_logout/triggers.py: idle timer + Windows session hook
  • auto_logout/system_utils.py: process and file helpers
  • auto_logout/config.py: settings, paths, defaults
  • auto_logout/action_logger.py: rotating file logger

Requirements

  • Python 3.10+
  • Windows 10/11 recommended

Notes:

  • Linux badge is included for roadmap visibility, but the current trigger implementation is Windows-focused.

Quick Start

Windows PowerShell

python app.py

Silent Startup

python app.py --silent

Settings

From the UI, you can configure:

  • Auto cleanup on app close
  • Auto cleanup on Windows sign-out
  • Idle timer threshold
  • Silent mode
  • Dashlane preserve mode
  • Target process list (comma-separated .exe names)

Settings are persisted to:

  • %APPDATA%/AutoLogout/settings.json

Logs are written to:

  • %LOCALAPPDATA%/AutoLogout/logs/autologout.log

Security and Limitations (No Admin Mode)

What is feasible without admin rights:

  • Stop processes in the current user session
  • Clear user-level browser session artifacts
  • React to Windows sign-out messages in the app window

What is not guaranteed:

  • Global server-side session invalidation for Google/Microsoft accounts
  • Forced sign-out for apps that require official APIs for remote token revocation

Practical impact:

  • AutoLogout focuses on reliable local workstation sign-out effects.
  • For enterprise-grade global revocation, combine this tool with IdP/MDM policies.

Dashlane Compatibility Mode

When Preserve Dashlane extension is enabled, cleanup skips selected shared Chromium storage paths that can force a full Dashlane extension re-login.

Trade-off:

  • Better Dashlane continuity (often master password prompt only)
  • Slightly less aggressive browser session cleanup in those preserved paths

Optional Portable Build

You can package AutoLogout as a single executable with PyInstaller:

pip install pyinstaller
pyinstaller --noconfirm --onefile --windowed --name AutoLogout app.py

The generated executable is placed under dist/.

Troubleshooting

  • If cleanup seems partial, make sure target apps/browsers are not protected by external policies.
  • Check the log file for per-step results and access errors.
  • If a browser profile is locked, rerun cleanup after process termination.

License

MIT