diff --git a/lib/client/mfa.go b/lib/client/mfa.go index f91dd5f65e3f0..5ef70e8653ef8 100644 --- a/lib/client/mfa.go +++ b/lib/client/mfa.go @@ -31,6 +31,7 @@ import ( "github.com/gravitational/teleport/api/client/proto" wanlib "github.com/gravitational/teleport/lib/auth/webauthn" wancli "github.com/gravitational/teleport/lib/auth/webauthncli" + "github.com/gravitational/teleport/lib/auth/webauthnwin" "github.com/gravitational/teleport/lib/utils/prompt" ) @@ -234,6 +235,13 @@ func PromptMFAChallenge(ctx context.Context, c *proto.MFAAuthenticateChallenge, prompt.SecondTouchMessage = "" case hasTOTP: // Webauthn + OTP prompt.FirstTouchMessage = fmt.Sprintf("Tap any %ssecurity key or enter a code from a %sOTP device", promptDevicePrefix, promptDevicePrefix) + + // Customize Windows prompt directly. + // Note that the platform popup is a modal and will only go away if + // canceled. + webauthnwin.PromptPlatformMessage = "Follow the OS dialogs for platform authentication, or enter an OTP code here:" + defer webauthnwin.ResetPromptPlatformMessage() + default: // Webauthn only prompt.FirstTouchMessage = fmt.Sprintf("Tap any %ssecurity key", promptDevicePrefix) }