0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
Commit graph

2 commits

Author SHA1 Message Date
Sam Lord
2740686d53
Refactored Captcha to simplify usage
ref BAE-397

Moved the hCaptcha component outside of the page level, since it was
complicating the logic within the pages with no good reason.

The hCaptcha component is now attached to the pop-up modal. Since it's
invisible, this doesn't impact layout anyway, but means that any action
can trigger Captcha to run, and use the result within that same action.

This simplifies the flow by having the action itself confirm that
Captcha is enabled, then grabbing the token by running either a
challenge (for self-hosters) or using their enterprise heuristics system
(for Ghost Pro).

This also fixes issues where sites with multiple tiers wouldn't work
with Captcha, since the page had changed and the hCaptcha component was
unloaded.
2025-02-17 08:17:58 +00:00
Sam Lord
d1f5ad7646
Portal: Fixed issue where signup was not always called with hCaptcha
ref BAE-375

Discovered a way to test hCaptcha using a mock -- so implemented that to
ensure hCaptcha is always called.
2025-02-03 14:48:23 +00:00