stuartpb / recaptchable

Helps display and validate Recaptchas for node.js
MIT License
0 stars 0 forks source link

Take options object as alternative to private/public keys #3

Open stuartpb opened 10 years ago

stuartpb commented 10 years ago

Also, ditch the current other two parameters: data should be an argument to verify (not the constructor, WTF), and the secure boolean is basically a huge mistake.

Options:

These keys will also be shadowed into RecaptchaOptions:

Also, note that I would generally consider RecaptchaOptions to be a presentation detail that should be handled in the template- all these options in the constructor are just an alternative. (You don't even need to use .widget/.toHTML at all.)

stuartpb commented 10 years ago

Maybe all these widget options should be available as an option to .widget()/.toHTML() (while still allowing their defaults to be specified).