-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Limit logins (by concurrency, location) #583
Comments
Nice idea @balazsorban44. Suggesting a list of values defined from the UTC offset of the time zone of the user or time zone code; either or both options will be great alternative to geolocation as the later requires an explicit consent of the user. We can also have concurrency, a permissible number of attempts, with a temporary account lock as throttling options. Below, the modulated snippet; allow: {
ip: [],
timezone: [0, 480], // or define same using timezoneCode: ['Africa/Accra', 'America/Los_Angeles'],
},
deny: {
ip: [],
timezone: [],
},
throttle: {
concurrent: 5, // maximum number of active login sessions allowed.
limit: 3, // total number of permissible attempts prior to temporary lock of account.
temporaryLock: 300, // a defined period in seconds to effect the temporary lock of account;
// here, disable login for the next 5 minutes after 3 consecutive failed authentication attempts.
}, |
Hi there! It looks like this issue hasn't had any activity for a while. It will be closed if no further activity occurs. If you think your issue is still relevant, feel free to comment on it to keep ot open. Thanks! |
Hi there! It looks like this issue hasn't had any activity for a while. To keep things tidy, I am going to close this issue for now. If you think your issue is still relevant, just leave a comment and I will reopen it. (Read more at #912) Thanks! |
Came here looking for exact same thing since my current project requires me to logout all other sessions but current. As in only allow single session. |
I propose to implement this using custom DB adapter. Basically in CreateSession method one can extend the functionality to find oldest session of given data.userid and set the expires to now(). This will result in the user's oldest session being smoothly logged out whenever they actually use the getsession method |
I'm here looking for the implementation that allows a single session. |
It would be great if we are able to pass the request information such as IP address to all the adapter methods. |
Any progress on this? |
Summary of proposed feature
Concurrent login: When a single user/account has multiple active/valid sessions throughout multiple devices/windows.
When a user tries to log in with their correct credentials, there are still multiple reasons for why it can be useful to reject/cancel the login process:
Purpose of proposed feature
Detail about proposed feature
To begin with, I propose a simple configuration API with a database, which holds the session information.
Example:
Potential problems
We should decide if the database needs to implement everything defined in the Models, or Session is enough, to keep it simple. It is interesting if one wishes to keep the JWT flow for everything else than session management.
Describe any alternatives you've considered
I started a discussion here with @iaincollins, and he agreed that a first-class solution would be interesting to others as well.
https://twitter.com/balazsorban44/status/1275757217103384576
Please indicate if you are willing and able to help implement the proposed feature.
I am willing to help with the implementation if we come to an agreement on the details.
The text was updated successfully, but these errors were encountered: