Code Monkey home page Code Monkey logo

prevent-concurrent-logins's People

Contributors

fjarrett avatar fjarrett-godaddy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prevent-concurrent-logins's Issues

breaks cross site authentication

Without this plugin visiting other sites authentication is automatic. Meaning, it is not required to login to each individual blog on a multi-site installation.

With this plugin, visiting other sites, authentication doesn't occur. Meaning, it is required to login to each individual blog on a multi-site installation. This action logs you out of all other blogs in the process, dooming the ability to authenticate once for the entire network.

Destroy old user sessions without a page reload

This suggestion was brought up in the forums for membership sites where page reloads may not be performed very often.

This could be achieved by polling the page with JavaScript, an easy thing to with the Heartbeat API. When an old user session is detected the user could be immediately logged out.

Additionally, a filter could be exposed to redirect the user to the URL of your choosing (such as the homepage), rather than destroying the session and always being sent to the login screen.

There are performance considerations to take if a feature like this were to be added, however, the plugin could simply gracefully degrade and require a page reload if the Heartbeat API is disabled - which you should be doing anyway if performance is a concern for you.

Restrict to IP

@fjarrett Do have an idea how to restrict WP sessions to the initial (at login time) IP address?
I'd like to implement it.

Destroy all old user sessions on plugin activation

Currently, old sessions for users are only destroyed when users login, they are not destroyed automatically when the plugin is activated because the code is designed to affect $current_user only.

This would be a nice feature to add so that immediate results are seen instead of having to wait for every user to take action. Even with several tens of thousands of users the process should be lean enough to run in only a few seconds.

See this comment by @chuckreynolds in a related project: fjarrett/user-session-control#2 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.