Developer forum

Forum » CMS - Standard features » Limit login from only one browser at a time for a single account in extranet login

Limit login from only one browser at a time for a single account in extranet login

Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

is there anyway to login only from one browser at a time for a single account in extranet?


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Shiwanka

No, that is currently not supported. Should be easy to make though.

On a user create a custom field "LoginDeviceToken" or something like that. Using a OnUserLogin notification (https://doc.dynamicweb.com/api/html/011a81d2-ac8d-fff2-8238-0c71cdcbb86b.htm), create a "Token" by combining the IP address and the useragent of the login into a string and store it on the user. You can also make a LoginDeviceTokenTimestamp field and log when the login happened.

Then on every pageview, or on a login, make some logic that will either prevent the user from logging in if they are already logged in on another device (using the token field and timestamp field and i.e. a login timeout of 30 minutes). Or logoff the first user when user 2 logs in.

BR Nicolai

Votes for this answer: 1
 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

Good Suggestion, Thanks nicolai

 

You must be logged in to post in the forum