Skip to content

Configure OTP policy as default but with code reusable to true in BrowserFlowTest#51130

Merged
ahus1 merged 1 commit into
keycloak:mainfrom
rmartinc:issue-51064
Jul 24, 2026
Merged

Configure OTP policy as default but with code reusable to true in BrowserFlowTest#51130
ahus1 merged 1 commit into
keycloak:mainfrom
rmartinc:issue-51064

Conversation

@rmartinc

Copy link
Copy Markdown
Contributor

Closes #51064

The issue in the test is just that the OTP policy by default does not allow to re-use the same token in the same window (30s). There are two tests using the same user to login with OTP. Depending the order and how fast the two tests are executed they can be in the same 30s window and the login fails in the second test. Just adding the configuration to re-use OTP tokens.

…wserFlowTest

Closes keycloak#51064

Signed-off-by: rmartinc <rmartinc@redhat.com>
Copilot AI review requested due to automatic review settings July 24, 2026 08:46
@rmartinc
rmartinc requested review from a team as code owners July 24, 2026 08:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Configures BrowserFlowTest to permit OTP reuse, preventing order- and timing-dependent failures within the same TOTP window.

Changes:

  • Applies the default TOTP policy with reusable codes enabled.
  • Preserves inherited test-realm password configuration.

@ahus1
ahus1 merged commit c84f10a into keycloak:main Jul 24, 2026
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: org.keycloak.testsuite.forms.BrowserFlowTest#testUserWithOneAdditionalFactorOtpSuccess

4 participants