Multiple logins from single account

Hello all. I have tried to research the issue that I’m faced with but haven’t had much luck, so was hoping that someone could point me in the right direction or suggest who to contact to have some work done to my WIX site (I don’t code).

I have a growing list of free members, and am contemplating charging for access to my site’s material. My problem is that, as it stands, WIX allows single users to sign in as many times as they like. Therefore, I could theoretically have someone sign up and pass their login details to 100 people around the world who can then log in, simultaneously, and access content for free.

The most important thing is that they shouldn’t be able to log in at the same time and, ideally, I would like WIX to deny access to a second user attempting to log on.

I have read some posts in regard to WIX-Realtime but don’t understand whether it could help me achieve this or how I would implement it. It may well be a paid job, or just simply impossible on this platform, but I would appreciate any advice.

Many thanks.

Maybe you can control users with IPs.

import wixData from ‘wix-data’ ;
import { fetch } from ‘wix-fetch’ ;
import wixUsers from “wix-users” ;

let user = wixUsers . currentUser ;
let userId = user . id ;
let isLoggedIn = user . loggedIn ;

$w . onReady ( function () {

fetch ( "https://extreme-ip-lookup.com/json" , { 
        method :  "get" 
    }) 
    . then (( httpResponse ) => { 
        if  ( httpResponse . ok ) { 
            **return**  httpResponse . json (); 
        } 
    }) 
    . then (( json ) => { 
        const  ipaddress  =  json . query ; 
        //Inserting user ip to UserCollection 
        console . log ( ipaddress ) 
        if  ( isLoggedIn ) { 
            wixData . query ( "UserCollection" ) 
                . eq ( "userIp" ,  ipaddress ) 
                . find () 
                . then (( result ) => { 
                    if  ( result . length  >  0 ) { 
                        // if userIp exist in UserCollection 
                    }  **else**  { 
                        // if userIp not exist in UserCollection 
                        let  toInsert  = { 
                            userIp :  ipaddress , 
                            userId :  userId , 
                            first_name :  "John" , 
                            last_name :  "Doe" 
                        }; 

                        wixData 
                            . insert ( "UserCollection" ,  toInsert ) 
                            . then (( results ) => { 
                                let  item  =  results ;  //see item below 
                            }) 
                            . catch (( err ) => { 
                                let  errorMsg  =  err ; 
                            }); 
                    } 
                }); 
        }  **else**  { 
            //Login please 
        } 

        //User access 
        wixData . query ( "UserCollection" ) 
            . eq ( "userIp" ,  ipaddress ) 
            . find () 
            . then (( result ) => { 
                if  ( result . length  >  0 ) { 
                    if  ( result . items [ 0 ]. userId  ===  userId ) { 
                        //You can access 
                    }  **else**  { 
                        //You can't access 
                    } 
                }  **else**  { 
                    //Login please 
                } 
            }) 
    }); 

});

Many thanks for your response, Erdem. How would I implement this and how would it work?

For example, you have 100 members, now when these members log in, their ip’s will be inserted to the UserCollection automatically. When you send that customers a coupon code or gift or whatever. That customers will be able to get it with their first account. However, when the customers opens an account for the second time, the ip’s will be checked and they will be blocked from receiving gifts again. It’s not a super solution, but it’ll do.

I am need of the same thing, any luck?