Skip to content

[v18] fix: Return friendly error message when MFA is required but the user has no devices enrolled 🐛 #58042

Merged
cthach merged 1 commit intobranch/v18from
bot/backport-57909-branch/v18
Aug 19, 2025
Merged

[v18] fix: Return friendly error message when MFA is required but the user has no devices enrolled 🐛 #58042
cthach merged 1 commit intobranch/v18from
bot/backport-57909-branch/v18

Conversation

@cthach
Copy link
Copy Markdown
Contributor

@cthach cthach commented Aug 19, 2025

Backport #57909 to branch/v18

changelog: Improve error message when a User without any MFA devices enrolled attempts to access a resource that requires MFA.

…has no devices enrolled 🐛 (#57909)

* fix: return friendly error message when MFA is required but the user has no devices enrolled

Signed-off-by: Chris Thach <chris.thach@goteleport.com>

* fix: improve error handling to provide clearer feedback when MFA requirements are not met upon connection to an App

Signed-off-by: Chris Thach <chris.thach@goteleport.com>

* refactor: make error messages consistent

Signed-off-by: Chris Thach <chris.thach@goteleport.com>

* refactor: remove wrapped message

Signed-off-by: Chris Thach <chris.thach@goteleport.com>

* test: add test for enrolled MFA device and update trusted device resp body assertion

Signed-off-by: Chris Thach <chris.thach@goteleport.com>

---------

Signed-off-by: Chris Thach <chris.thach@goteleport.com>
@cthach cthach force-pushed the bot/backport-57909-branch/v18 branch from 2ef2a89 to 5262943 Compare August 19, 2025 14:48
@cthach cthach self-assigned this Aug 19, 2025
@cthach cthach marked this pull request as ready for review August 19, 2025 15:13
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from zmb3 August 19, 2025 15:48
@cthach cthach added this pull request to the merge queue Aug 19, 2025
Merged via the queue into branch/v18 with commit b94f9a9 Aug 19, 2025
46 checks passed
@cthach cthach deleted the bot/backport-57909-branch/v18 branch August 19, 2025 16:12
@doggydogworld doggydogworld mentioned this pull request Aug 20, 2025
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.

3 participants