You could just sell "key.txt" or "password.txt" on the same itch page as the browser game and in game have a text input that unlocks the game on putting in matching string. And store unlock toggle in save file.
Viewing post in Selling web games
The goal should be to
- Make it possible for devs to sell web games and keeping their games accessibility and platform agnostic.
- Make it easy and none intrusive for paying players so that they get the best experience and can play the game on every platform that has a browser without paying extra for each platform.
- Making it (optimally) impossible or as annoying as possible for websites to steal the devs browser game to put it up for free. Goal number 2) should take priority over 3)
With your suggestion the developer might as well put the game up for free, you’ll find that key on google day one. The proposal I made would be none intrusive to players who own the game, they just need an itch account. It’s still not really safe from people who want to steal the game, but itch can make it annoying enough to keep this to an acceptable minimum.