Skip to content

Conversation

@jwag956
Copy link
Collaborator

@jwag956 jwag956 commented Jan 22, 2026

Previously, whether two-factor authentication was required was controlled by SECURITY_TWO_FACTOR_REQUIRED and whether the user had recently successfully performed a second factor authentication. This default behavior hasn't changed - but now, all the authentication code calls UserMixin.check_tf_required() which, if overridden in an application, can make the decision any way they want - for example - based on user group.

Also - improve JSON api by always returned tf_required (true or false). Previously this key was only returned if True.

closes #1168

…ments.

Previously, whether two-factor authentication was required was controlled by SECURITY_TWO_FACTOR_REQUIRED and whether
the user had recently successfully performed a second factor authentication.
This default behavior hasn't changed - but now, all the authentication code calls UserMixin.check_tf_required() which, if
overridden in an application, can make the decision any way they want - for example - based on user group.

closes #1168
@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.52%. Comparing base (334fd45) to head (3bd4cb0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1170   +/-   ##
=======================================
  Coverage   98.52%   98.52%           
=======================================
  Files          40       40           
  Lines        5008     5023   +15     
=======================================
+ Hits         4934     4949   +15     
  Misses         74       74           

☔ 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.

@jwag956 jwag956 merged commit 41ea63c into main Jan 24, 2026
20 checks passed
@jwag956 jwag956 deleted the 2fa1168 branch January 24, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Support API for managing two-factor requirement

1 participant