Skip to content

Fix issue for getting otp using keycloak auth#2937

Merged
ryan-pratt merged 1 commit into
mainfrom
bug/keycloak-auth
Mar 5, 2026
Merged

Fix issue for getting otp using keycloak auth#2937
ryan-pratt merged 1 commit into
mainfrom
bug/keycloak-auth

Conversation

@ryan-pratt
Copy link
Copy Markdown
Contributor

@ryan-pratt ryan-pratt commented Mar 5, 2026

Quick fix to handle differences between core and enterprise (keycloak) auth classes (creating token in constructor vs. in token getter)

related to #2911

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 5, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.48%. Comparing base (3e325a7) to head (dcf8e13).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2937      +/-   ##
==========================================
+ Coverage   77.79%   78.48%   +0.68%     
==========================================
  Files         471      673     +202     
  Lines       34647    55277   +20630     
  Branches      728      728              
==========================================
+ Hits        26955    43386   +16431     
- Misses       7614    11813    +4199     
  Partials       78       78              
Flag Coverage Δ
python 79.74% <ø> (-16.30%) ⬇️
ruby-api 80.77% <ø> (+0.27%) ⬆️
ruby-backend 82.14% <100.00%> (+<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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@EmilyRagan EmilyRagan left a comment

Choose a reason for hiding this comment

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

Fixes the problem I was having with Enterprise 👍🏻

@jmthomas
Copy link
Copy Markdown
Member

jmthomas commented Mar 5, 2026

How was I not running into this?

@ryan-pratt
Copy link
Copy Markdown
Contributor Author

ryan-pratt commented Mar 5, 2026

How was I not running into this?

It didn't affect core. But if you didn't run into this in enterprise, then it was probably a race condition in how it was being used. If something requested a normal session token before requesting an OTP, then the keycloak class' token function would execute and initialize stuff, putting it in place for the otp function to use it

@ryan-pratt ryan-pratt merged commit 82ab021 into main Mar 5, 2026
32 of 33 checks passed
@ryan-pratt ryan-pratt deleted the bug/keycloak-auth branch March 5, 2026 20:21
jmthomas pushed a commit that referenced this pull request Mar 21, 2026
Fix issue for getting otp using keycloak auth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants