Skip to content

web/flow: reset stale authenticator selection between consecutive validate stages#20802

Open
Oluwatobi-Mustapha wants to merge 3 commits intogoauthentik:mainfrom
Oluwatobi-Mustapha:fix/mfa-autoselect-stage-scope-14941
Open

web/flow: reset stale authenticator selection between consecutive validate stages#20802
Oluwatobi-Mustapha wants to merge 3 commits intogoauthentik:mainfrom
Oluwatobi-Mustapha:fix/mfa-autoselect-stage-scope-14941

Conversation

@Oluwatobi-Mustapha
Copy link
Contributor

@Oluwatobi-Mustapha Oluwatobi-Mustapha commented Mar 9, 2026

Fixes #14941

When the authenticator-validate stage component is reused across consecutive MFA stages, the previous selected challenge can persist into the next stage even if that challenge is no longer allowed.

This change resets the selected challenge when challenge updates and the previous selection is not present in the new deviceChallenges set, then re-runs the existing auto-selection initialization path for the new challenge.

Also adds unit coverage for stale-selection reset behavior.

@Oluwatobi-Mustapha Oluwatobi-Mustapha requested a review from a team as a code owner March 9, 2026 10:59
@netlify
Copy link

netlify bot commented Mar 9, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit d3b5189
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69aea85e520ec10008cd143e
😎 Deploy Preview https://deploy-preview-20802--authentik-integrations.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 Mar 9, 2026

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 6782464
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69aeff06637ff40008bd3865
😎 Deploy Preview https://deploy-preview-20802--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 Mar 9, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 87c4a8a
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69aea818142cf20008f94a2b
😎 Deploy Preview https://deploy-preview-20802--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.

@netlify
Copy link

netlify bot commented Mar 9, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit d3b5189
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69aea85edb4fd70008628b22
😎 Deploy Preview https://deploy-preview-20802--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 Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.40%. Comparing base (0fda2e6) to head (6782464).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20802      +/-   ##
==========================================
- Coverage   93.44%   93.40%   -0.05%     
==========================================
  Files         992      992              
  Lines       55876    55876              
==========================================
- Hits        52213    52189      -24     
- Misses       3663     3687      +24     
Flag Coverage Δ
conformance 37.59% <ø> (+<0.01%) ⬆️
e2e 43.12% <ø> (+<0.01%) ⬆️
integration 22.27% <ø> (-0.05%) ⬇️
unit 91.60% <ø> (+<0.01%) ⬆️
unit-migrate 91.69% <ø> (+<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.

@GirlBossRush GirlBossRush self-requested a review March 9, 2026 15:36
@GirlBossRush GirlBossRush force-pushed the fix/mfa-autoselect-stage-scope-14941 branch from d3b5189 to 6782464 Compare March 9, 2026 17:10
@GirlBossRush GirlBossRush added the area:frontend Features or issues related to the browser, TypeScript, Node.js, etc label Mar 9, 2026
@GirlBossRush GirlBossRush self-assigned this Mar 9, 2026
@GirlBossRush GirlBossRush added the backport/version-2026.2 Add this label to PRs to backport changes to version-2026.2 label Mar 9, 2026
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

None yet

Development

Successfully merging this pull request may close these issues.

Available MFA device is not shown properly

2 participants