Navigation
View as Markdown

LearnWorlds account sharing prevention with Rupt

LearnWorlds has no built-in account sharing or password sharing protection. Rupt adds it with a single script tag: paste it into LearnWorlds' logged-in custom code, add a policy in the Rupt dashboard, and Rupt detects concurrent sessions, challenges the extra viewer, and logs unauthorized devices out. No server code required.

This guide assumes you've already chosen Rupt and want to wire it into LearnWorlds. For the background on why account sharing happens and how detection works, see Account sharing prevention.

Step 1: Add the Rupt script to LearnWorlds

The script reads the signed-in user from the data-user-id and data-user-email values, which LearnWorlds fills in from its own template variables. It triggers a challenge when one of your policies fires.

In LearnWorlds, go to Site builder → Custom Code, open the <head> logged in (html) tab, paste this in, and save:

<script
  src="https://cdn.rupt.dev/integrations/learnworlds/1.1.0/learnworlds.js"
  data-client-id="xxxx-xxxx-xxxx-xxxx"
  data-user-id="{{ USER.ID }}"
  data-user-email="{{ USER.EMAIL }}"
  async
></script>

Swap xxxx-xxxx-xxxx-xxxx for your client ID from the Rupt dashboard. Leave the {{ USER.ID }} and {{ USER.EMAIL }} values as they are: LearnWorlds replaces them with the real user when the page loads.

Rupt's Access protection handles detection, the challenge, owner verification, and device capping on the client. No extra code on your side.

Step 2: Configure your account sharing policies

Policies are what actually catch sharing. Without at least one policy on the access trigger, the script runs but never challenges anyone.

A policy has a trigger (the event it runs on) and a verdict. In your policies dashboard, add a policy on the access trigger that challenges when it sees concurrent sessions or too many devices. The Account sharing prevention guide has the exact policies to start from.

Set the challenge success URL to your signup or offer page so the extra viewer can start their own subscription.

If no sessions show up in your dashboard after a few logins, check that the script is in the <head> logged in (html) tab (not the logged-out one) and that the client ID matches the one in your Rupt dashboard.

Frequently asked questions

Does LearnWorlds prevent account sharing? LearnWorlds has no native account sharing or password sharing protection. You add it by installing Rupt, which detects concurrent sessions and challenges unauthorized viewers through a script in LearnWorlds' logged-in custom code.

How do I stop password sharing on LearnWorlds? Add the Rupt script under Site builder → Custom Code in the logged-in head tab, then create an access policy in the Rupt dashboard that triggers on concurrent sessions. Rupt handles detection, the challenge, and device logout automatically.

Does Rupt work with LearnWorlds' existing login? Yes. The script reads the signed-in user from LearnWorlds' own template variables, so no changes to LearnWorlds' login or member area are needed. It loads with async, so it doesn't block your pages.