Extensions:Captcha

From Lorekeeper Wiki
Revision as of 07:48, 11 June 2020 by Mercury (talk | contribs)
Jump to navigation Jump to search
Captcha
Description Adds a captcha to the registration page.
Author(s) Mercury
Status Stable WIP
Github Captcha
LK Version Unspecified
Uses a Package


This adds a captcha to the registration page. It's not entirely finished; the error messages are not correctly hooked up. It does, however, work-- allowing registrations that satisfy the captcha and disallowing those that do not. And in the meantime, it spits out a rough but descriptive enough error. Given that it was done out of necessity, it did the trick.

Installation

This makes use of anhskohbo/No-Captcha . Composer.json has already been updated to include this, so you can just run composer update or equivalent after pulling the branch.

Configuration

These instructions are derived from those on the package itself. Note that in this case Laravel will indeed auto-discover the package, so we skip directly to configuration.

First, obtain your secret and site keys from Google; you can do so here.

Then add NOCAPTCHA_SECRET and NOCAPTCHA_SITEKEY to your .env file, like so:

NOCAPTCHA_SECRET=secret-key
NOCAPTCHA_SITEKEY=site-key

That's it! The remainder of the configuration is accounted for by this branch.

Usage

Nothing specific.

Troubleshooting

While it ought to be mostly stable, I'll not rule out that issues could arise. If they do, I'm available via the Lorekeeper discord!

Error Messages

As mentioned, the nice and tidy error messages are not hooked up entirely; this is due to difficulty coercing them to work. While I may return to this, it is not a priority. Contributions on this front are welcome! Find me in the Lorekeeper discord if interested.

See Also