Hi,
our initial testing with this feature was very positive. However, we fear that some of our users may not fully understand that they are receiving an e-mail and have to check their inbox. The "default" verification mechanism shows a message like this:
Verification code has been sent to your inbox. Please copy it to the input box below.
(key: "ver_info_msg")
Is there a way to get a localized message to the user for this? Localization via the usual mechanisms would be great. I understand that it is probably not trivial, since the one-time-password provider can be used in a number of ways - not only for custom e-mails - but it would be great to have the ability to give the user some feedback.
Are there some more UserMessages available for this? My current workaround is to localize the description and the placeholder for the "Verification Code" field, but this is less visible for the user.
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.OneTimePasswordProtocolProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Metadata>
<Item Key="Operation">VerifyCode</Item>
<Item Key="UserMessage.VerificationHasExpired">You have exceed the maximum time allowed.</Item>
<Item Key="UserMessage.MaxRetryAttemped">You have exceed the number of retries allowed.</Item>
<Item Key="UserMessage.InvalidCode">You have entered the wrong code.</Item>
<Item Key="UserMessage.ServerError">Cannot verify the code, please try again later.</Item>
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The Localization string IDs contains the list of ID for the OTP error messages. Take a look at the bottom of the doc ("Verification display control error messages" section, which will be changed to "One time password technical profile" soon)
@yoelhor thanks, I saw that. Unfortunately those are only error messages. Is there a way to show an info message to the user after OTP was sent without causing an error? Like I said, the equivalent of "ver_info_msg" in the current flow. Would throwing an error even work?
Got it. Thanks for letting me know, I'm currently looking into this issue with our engineerings and will keep you posted ASAP.
FYI for anyone looking at this in the future - while looking for the same thing, I noticed that they've now added that item in localization as verification_control_code_sent
Most helpful comment
Got it. Thanks for letting me know, I'm currently looking into this issue with our engineerings and will keep you posted ASAP.