My advice is to not bother trying to make it super secure.
If you are shipping JavaScript then at some point there will likely be an option for the user to just comment out the line where you do the check. If you attempt to engage in some sort of arms race with node as the battlefield, you're going to be at a huge disadvantage and will spend way more trying to solve the problem than it is worth.
The route I went was to make a key generation and validation mechanism that is just complicated enough that it wouldn't be reasonable to say you "accidentally" circumvented the check. I spent a few hours on it and went back to working on more important things.
~Ryan
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/57b09be5-8df7-483d-ad77-e50a0bb0b2ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
~Ryan