how do I create a verification code (by SMS or email) for my paying members who connect to my wix site?

Hello and thank you in advance for taking the time to understand my situation and give me your advice.

My Wix site will offer paid member spaces with specific pages for these members (wix form). However, I realized that my members could share their access codes with friends and all entered at the same time with the same access code.

After several hours and days of research, I came to the conclusion that the only solution is in a specific code to be created to request an access verification by SMS or email to my members when they reconnect to my website.

You know the kind of numeric code that is sent to us by SMS or email and that we received from the site to confirm our identity.

Can someone help me create this HTML code so that I can integrate it into my website?

One last question, is there a code that could disconnect my members automatically from my website when they have been inactive for a few hours (like inactive for 2 hours)?

I look forward to reading your comments and suggestions and thank you in advance for your help.