Skip to content

stages/captcha: fix hcaptcha height - #20901

Merged
gergosimonyi merged 1 commit into
goauthentik:mainfrom
harrisonfishco:stages/fix-hcaptcha-stage-size
Jul 6, 2026
Merged

gergosimonyi merged 1 commit into
goauthentik:mainfrom
harrisonfishco:stages/fix-hcaptcha-stage-size

Conversation

@harrisonfishco

Copy link
Copy Markdown
Contributor

Details

The hCaptcha has a nested iframe that changes height when progressing to the second step. The code change monitors inner iframes to find the correct height whenever the style or children change to correctly update the height.

According to the code, the nested iframes are similar to Google ReCaptcha. This code should be compatible, but I do not have an API key to test with. PLEASE TEST BEFORE MERGING

Example of hCaptcha "Step 1"
image

Example of hCaptcha "Step 2"
image

closes #18971

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

@harrisonfishco
harrisonfishco requested a review from a team as a code owner March 14, 2026 02:30
@netlify

netlify Bot commented Mar 14, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 5832e29
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69b4c82b29b68700084d2d7a
😎 Deploy Preview https://deploy-preview-20901--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Mar 14, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 5832e29
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69b4c82b3758b700085f08af
😎 Deploy Preview https://deploy-preview-20901--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@GirlBossRush GirlBossRush added the backport/version-2026.2 Add this label to PRs to backport changes to version-2026.2 label Mar 17, 2026
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Mar 17, 2026
@GirlBossRush GirlBossRush self-assigned this Mar 17, 2026
@GirlBossRush GirlBossRush added the area:frontend Features or issues related to the browser, TypeScript, Node.js, etc label Mar 17, 2026
@GirlBossRush

Copy link
Copy Markdown
Contributor

@harrisonfishco Well done! 👏🏻

The captcha components are especially thorny given our double-framing. I suspect there might be some edge cases remaining, but this looks like the right direction.

@codecov

codecov Bot commented Mar 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.42%. Comparing base (e9b33be) to head (5832e29).
⚠️ Report is 49 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20901      +/-   ##
==========================================
- Coverage   93.48%   93.42%   -0.06%     
==========================================
  Files         991      991              
  Lines       56090    56090              
==========================================
- Hits        52434    52404      -30     
- Misses       3656     3686      +30     
Flag Coverage Δ
conformance 37.43% <ø> (+<0.01%) ⬆️
e2e 42.95% <ø> (-0.01%) ⬇️
integration 22.17% <ø> (-0.05%) ⬇️
unit 91.64% <ø> (ø)
unit-migrate 91.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gergosimonyi
gergosimonyi merged commit 63d7b6a into goauthentik:main Jul 6, 2026
100 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jul 6, 2026
GirlBossRush pushed a commit that referenced this pull request Jul 6, 2026
stages/captcha: fix hcaptcha height (#20901)

Co-authored-by: Harrison Fishco <[email protected]>
GirlBossRush pushed a commit that referenced this pull request Jul 20, 2026
@DevDorrejo

Copy link
Copy Markdown

have this issue in 2026.5.6 and before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Features or issues related to the browser, TypeScript, Node.js, etc backport/version-2026.2 Add this label to PRs to backport changes to version-2026.2

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

hCaptcha does not render correctly on Captcha Stage

4 participants