Difference between revisions of "Extensions:Captcha"
Tag: 2017 source edit |
(More thorough explanation of the versions since it's been a common misconception.) Tag: 2017 source edit |
||
(21 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{Extensioninfobox|title=Captcha|desc=Adds a captcha to the registration page.|auth=Mercury|status=Stable | + | {{Extensioninfobox|title=Captcha|desc=Adds a captcha to the registration page.|auth=Mercury|status=Stable/Testing|github={{Github|user=itinerare|branch=extension/captcha-v2|repo=lorekeeper-ext-archive}} {{Github|user=itinerare|branch=extension/captcha-v3}}|migration=no|package=yes|repo=lorekeeper-ext-archive|dev300=yes}} |
<!-- Put a short summary of your extension here! --> | <!-- Put a short summary of your extension here! --> | ||
− | This adds a captcha to the registration page. | + | |
+ | {| style="margin: 4px auto; width: 80%; border: 1px solid #9ADC38; background: #A1F524;" | ||
+ | |- | ||
+ | | '''<u>THIS EXTENSION IS PART OF v3.0.0</u>''' | ||
+ | |- | ||
+ | | This extension (Captcha V3 version) has been merged into the v3.0.0 branch as [https://github.com/corowne/lorekeeper/pull/169 Captcha]. | ||
+ | |} | ||
+ | |||
+ | |||
+ | This adds a captcha to the registration page. The recaptcha version doesn't equal to the version of Lorekeeper. Those on main/v2 can use v3 of the recaptcha just fine while those on v3, you will not need to install this since it's already part of it. | ||
== Installation == | == Installation == | ||
<!-- Describe installation. Include any requirements (such as packages), necessary commands, etc. --> | <!-- Describe installation. Include any requirements (such as packages), necessary commands, etc. --> | ||
− | This makes use of | + | This makes use of {{github|user=anhskohbo|repo=No-Captcha}}. There is now also a version making use of reCaptcha v3 using {{github|user=josiasmontag|repo=laravel-recaptchav3}}. In either case, pull the desired branch, then: |
+ | {{Composer}} | ||
== Configuration == | == Configuration == | ||
<!-- Is any configuration necessary? Describe it here! --> | <!-- Is any configuration necessary? Describe it here! --> | ||
+ | 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 [https://www.google.com/recaptcha/admin here]. For the original version: The captcha version and type are v2 and checkbox, respectively. The v3 version uses, of course, v3. | ||
+ | |||
+ | '''For the original version:''' | ||
+ | Add <code>NOCAPTCHA_SECRET</code> and <code>NOCAPTCHA_SITEKEY</code> to your .env file, like so: | ||
+ | <pre>NOCAPTCHA_SECRET=secret-key | ||
+ | NOCAPTCHA_SITEKEY=site-key</pre> | ||
+ | |||
+ | '''For the v3 version:''' | ||
+ | Add <code>RECAPTCHAV3_SITEKEY</code> and <code>RECAPTCHAV3_SECRET</code> to your .env file, like so: | ||
+ | <pre>RECAPTCHAV3_SITEKEY=sitekey | ||
+ | RECAPTCHAV3_SECRET=secret</pre> | ||
+ | |||
+ | That's it! The remainder of the configuration is accounted for by this branch. | ||
== Usage == | == Usage == | ||
<!-- Is there anything users should know about using your extension? --> | <!-- Is there anything users should know about using your extension? --> | ||
+ | Nothing specific. | ||
== Troubleshooting == | == Troubleshooting == | ||
<!-- Are there known issues or errors that require user action? Who should they contact, and where, for support? --> | <!-- Are there known issues or errors that require user action? Who should they contact, and where, for support? --> | ||
+ | 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! | ||
== See Also == | == See Also == | ||
<!-- Any relevant other pages. You may consider linking to related extensions, for instance. --> | <!-- Any relevant other pages. You may consider linking to related extensions, for instance. --> | ||
− | + | * [[Updating:_to_3.0.0]] | |
− | [[ |
Latest revision as of 19:52, 5 December 2024
Description | Adds a captcha to the registration page. |
---|---|
Author(s) | Mercury |
Status | Stable/Testing |
Github |
itinerare/lorekeeper-ext-archive/extension/captcha-v2 extension/captcha-v3 |
LK Version | Unspecified |
Uses a Package | |
Is part of LK v3.0.0's release | |
THIS EXTENSION IS PART OF v3.0.0 |
This extension (Captcha V3 version) has been merged into the v3.0.0 branch as Captcha. |
This adds a captcha to the registration page. The recaptcha version doesn't equal to the version of Lorekeeper. Those on main/v2 can use v3 of the recaptcha just fine while those on v3, you will not need to install this since it's already part of it.
Installation
This makes use of anhskohbo/No-Captcha . There is now also a version making use of reCaptcha v3 using josiasmontag/laravel-recaptchav3 . In either case, pull the desired branch, then:
Installing packages with Composer: |
Commands are given as composer [command] ; if you have not installed composer globally, they will be php composer.phar [command] instead.
|
You may need to run composer self-update (assuming you have not recently) before installing package(s). If possible, update to composer v2.x; you may need to use the command composer self-update --2 .
|
If feasible, run composer update .
|
If you encounter memory issues: Locally, run composer update . Copy the composer.lock file to your site's server.
|
Run composer install .
|
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. For the original version: The captcha version and type are v2 and checkbox, respectively. The v3 version uses, of course, v3.
For the original version:
Add NOCAPTCHA_SECRET
and NOCAPTCHA_SITEKEY
to your .env file, like so:
NOCAPTCHA_SECRET=secret-key NOCAPTCHA_SITEKEY=site-key
For the v3 version:
Add RECAPTCHAV3_SITEKEY
and RECAPTCHAV3_SECRET
to your .env file, like so:
RECAPTCHAV3_SITEKEY=sitekey RECAPTCHAV3_SECRET=secret
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!