Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-preventconcurrentlogins

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-preventconcurrentlogins

Django middleware that prevents multiple concurrent logins.

  • 0.8.2
  • PyPI
  • Socket score

Maintainers
1

django-preventconcurrentlogins

Django middleware that prevents multiple concurrent logins. If a user is already logged into the Django application and tries to log in somewhere else, the previous session is deleted.

This package is based on code from http://stackoverflow.com/a/1814797 and https://gist.github.com/peterdemin/5829440.

Usage

  1. Add "preventconcurrentlogins" to your INSTALLED_APPS settings like this::

        INSTALLED_APPS = {        
            ...
                'preventconcurrentlogins',
        }
    
  2. Add "preventconcurrentlogins.middleware.PreventConcurrentLoginsMiddleware" to MIDDLEWARE_CLASSES::

        MIDDLEWARE_CLASSES = {        
            ...
                'preventconcurrentlogins.middleware.PreventConcurrentLoginsMiddleware',
        }
    
  3. Run python manage.py migrate to create the visitor model that is used to track a users currently active session key.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc