Skip to content

[Turnstile] Issues with missing Form ID, server-side validation, and double rendering #320

@KarlKeu00

Description

@KarlKeu00

I am encountering multiple issues when trying to use Cloudflare Turnstile with the Grav Login plugin. It appears the integration is currently broken in three specific ways:

  1. Missing Form ID (JS Error) By default, the Turnstile widget does not render because the login form does not have the expected ID.
    • Error: The console reports Cannot find form #login.
    • Result: The user cannot see or interact with the captcha.
  2. Validation fails/is ignored If I manually add the ID grav-login to the form container to fix the rendering issue, the widget appears. However, the server-side validation does not seem to work. Even when explicitly adding process: turnstile: true to the form definition, the form submits without correctly validating the Turnstile token.
  3. Double Rendering on failed login If a login attempt fails, the page reloads and the Turnstile widget is rendered twice on the screen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions