Skip to content

Commit 332c51f

Browse files
committed
fix: removeDevice API allowed removing TOTP devices without the user completing MFA
1 parent 727ef27 commit 332c51f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
## [unreleased]
1010

1111
## [0.29.0] - 2025-02-17
12+
- Fixes an issue where `removeDevice` API allowed removing TOTP devices without the user completing MFA.
13+
- Brings SDK in-line with Node SDK v21.1.0
14+
15+
### Test infrastructure
1216
- Migrates unit tests to use a containerized core
1317
- Updates `Makefile` to use a Docker `compose` setup step
1418
- Migrates unit tests from CircleCI to Github Actions
15-
- Adds lint/format checks to Github Actions
19+
- Adds lint/format checks to Github Actions
20+
- Migrates backend-sdk-testing test to use a containerized core
21+
- Migrates unit tests from CircleCI to Github Actions
22+
1623

1724
## [0.28.0] - 2025-02-10
1825
- **[Breaking] Updates pre-commit hooks to use `pre-commit`**

supertokens_python/recipe/totp/api/remove_device.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ async def handle_remove_device_api(
3535

3636
session = await get_session(
3737
api_options.request,
38-
override_global_claim_validators=lambda _, __, ___: [],
38+
override_global_claim_validators=lambda global_claim_validators, __, ___: [
39+
gcv for gcv in global_claim_validators if gcv.id == "st-mfa"
40+
],
3941
session_required=True,
4042
user_context=user_context,
4143
)

0 commit comments

Comments
 (0)