Skip to content

web/admin: fix captcha stage provider selector not showing saved value#19555

Merged
dominic-r merged 2 commits intomainfrom
sdko/captcha-fix-selector
Jan 22, 2026
Merged

web/admin: fix captcha stage provider selector not showing saved value#19555
dominic-r merged 2 commits intomainfrom
sdko/captcha-fix-selector

Conversation

@dominic-r
Copy link
Member

Overview:

When editing an existing captcha stage, the Provider Type dropdown always showed "Google reCAPTCHA v2" (the first option) instead of the actual configured provider (e.g. Cloudflare Turnstile).

The root cause was using .value=${this.selectedProvider} on the <select> element, which doesn't work reliably in Lit templates. the browser selects the first <option> by default before the property binding takes effect.

Fixed by adding the selected attribute directly to each <option> element.

Testing:

  1. Create a new captcha stage with Cloudflare Turnstile
  2. Save and close the form
  3. Edit the stage again
  4. Verify the Provider Type dropdown shows "Cloudflare Turnstile" instead of "Google reCAPTCHA v2"

Motivation:

Closes #19550

@dominic-r dominic-r added this to the Release 2025.12.2 milestone Jan 18, 2026
@dominic-r dominic-r self-assigned this Jan 18, 2026
@dominic-r dominic-r requested a review from a team as a code owner January 18, 2026 18:41
@dominic-r dominic-r added area:frontend Features or issues related to the browser, TypeScript, Node.js, etc backport/version-2025.12 Add this label to PRs to backport changes to version-2025.12 labels Jan 18, 2026
@netlify
Copy link

netlify bot commented Jan 18, 2026

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 04502e4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/697177e2538f150008bee51a
😎 Deploy Preview https://deploy-preview-19555--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
Copy link

netlify bot commented Jan 18, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 04502e4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/697177e2035ac10008b10904
😎 Deploy Preview https://deploy-preview-19555--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.

@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.30%. Comparing base (77dd935) to head (04502e4).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19555      +/-   ##
==========================================
+ Coverage   93.27%   93.30%   +0.03%     
==========================================
  Files         949      949              
  Lines       52131    52131              
==========================================
+ Hits        48626    48643      +17     
+ Misses       3505     3488      -17     
Flag Coverage Δ
conformance 38.26% <ø> (+<0.01%) ⬆️
e2e 44.11% <ø> (+<0.01%) ⬆️
integration 23.21% <ø> (+<0.01%) ⬆️
unit 91.53% <ø> (+0.01%) ⬆️
unit-migrate 91.55% <ø> (+<0.01%) ⬆️

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 18, 2026

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-04502e4851cde85a12ba55a7d0a56546d40cb787
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-04502e4851cde85a12ba55a7d0a56546d40cb787

Afterwards, run the upgrade commands from the latest release notes.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in authentik Core Jan 22, 2026
Overview:

When editing an existing captcha stage, the Provider Type dropdown always showed "Google reCAPTCHA v2" (the first option) instead of the actual configured provider (e.g. Cloudflare Turnstile).

The root cause was using `.value=${this.selectedProvider}` on the `<select>` element, which doesn't work reliably in Lit templates. the browser selects the first `<option>` by default before the property binding takes effect.

Fixed by adding the `selected` attribute directly to each `<option>` element.

Testing:

1. Create a new captcha stage with Cloudflare Turnstile
2. Save and close the form
3. Edit the stage again
4. Verify the Provider Type dropdown shows "Cloudflare Turnstile" instead of "Google reCAPTCHA v2"

Motivation:

Closes #19550
Matches previous behavior and makes it slightly friendlier than a blank page without any help.
@GirlBossRush GirlBossRush force-pushed the sdko/captcha-fix-selector branch from be46155 to 04502e4 Compare January 22, 2026 01:05
@dominic-r dominic-r merged commit 1fa2cc0 into main Jan 22, 2026
101 checks passed
@dominic-r dominic-r deleted the sdko/captcha-fix-selector branch January 22, 2026 02:10
@github-project-automation github-project-automation bot moved this from In Progress to Done in authentik Core Jan 22, 2026
authentik-automation bot pushed a commit that referenced this pull request Jan 22, 2026
This cherry-pick has conflicts that need manual resolution.

Original PR: #19555
Original commit: 1fa2cc0
@authentik-automation
Copy link
Contributor

⚠️ Cherry-pick to version-2025.12 has conflicts: #19656

@GirlBossRush GirlBossRush restored the sdko/captcha-fix-selector branch January 22, 2026 02:20
dominic-r added a commit that referenced this pull request Jan 29, 2026
This cherry-pick has conflicts that need manual resolution.

Original PR: #19555
Original commit: 1fa2cc0
dominic-r added a commit that referenced this pull request Jan 30, 2026
This cherry-pick has conflicts that need manual resolution.

Original PR: #19555
Original commit: 1fa2cc0
dominic-r added a commit that referenced this pull request Jan 30, 2026
…e (cherry-pick #19555 to version-2025.12) (#19656)

Cherry-pick #19555 to version-2025.12 (with conflicts)

This cherry-pick has conflicts that need manual resolution.

Original PR: #19555
Original commit: 1fa2cc0

Co-authored-by: Dominic R <dominic@sdko.org>
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-2025.12 Add this label to PRs to backport changes to version-2025.12

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Cloudflare turnstile captcha named Google captcha v2 instead

2 participants