Skip to content

hCaptcha failed to initialize on link registration page #14766

@qwertfisch

Description

@qwertfisch
  • Gitea version (or commit ref): 1.13.1
  • Git version: irrelevant
  • Operating system: Linux
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No, because hCaptcha is not used in that Gitea instance

Description

Using hCaptcha as captcha type, for all new users to register an inline hCaptcha element is displayed and needs to be solved by the user. This works well on the standard register page (/user/sign_up).

When using a linked login, e.g. login through Github and then trying to link the Github account with a new Gitea user to be registered, the hCaptcha element is not loaded because it cannot be initialized. Trying to complete the registration therefore fails because of not solved captcha.

Screenshots

Login via external method

Before registration on Gitea, first login via Github. Then select Register new account on the resulting page to link a new Gitea account with Github (/user/link_account). The inline hCaptcha element cannot initialize:
registration1

Registration fails

Just trying to complete the registration of course fails:
registration2

Expectation

I expect the hCaptcha element to load on both pages, /user/sign_up and /user/link_account. The latter is a specific case to register just using an external login and create a linked Gitea account without password. Nonetheless it should also work with hCaptcha and use the same hCaptcha credentials / keys as on the standard registration page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions