Hi, thanks for the project, very useful!
I have a requirement to have a single session only for a subset of users (e.g. consider a user on a free trial where we don't want them to share login details).
In this case, in addition to the SINGLE_USER_SESSION setting, it might be useful to have a setting which is a callback that takes a user object, and returns True or False depending on if other sessions should be signed out or not.
Does this sound like something that could be added? If so, I'm happy to contribute the changes in a PR.
Yes, looks like an excellent idea! Perhaps accept True (always), False (never), or a string that is a path to a function that takes the user as parameter.
Hi, thanks for the project, very useful! I have a requirement to have a single session only for a subset of users (e.g. consider a user on a free trial where we don't want them to share login details). In this case, in addition to the
SINGLE_USER_SESSION
setting, it might be useful to have a setting which is a callback that takes a user object, and returns True or False depending on if other sessions should be signed out or not.Does this sound like something that could be added? If so, I'm happy to contribute the changes in a PR.