Why It Matters: - [Friction Reduction & User e...
# ask-a-descoper
t
Why It Matters: • [Friction Reduction & User expectation] Feedback in early UX testing of our members app shows that there is an expectation that the OTP code will inject when it arrives
Here is an example from American Express
f
@great-diamond-35515 Can you please help?
t
We are using your flows rather than building our own and calling the APIs, so I am not sure how this impacts our ability to do this.
f
I get it now. Let me chat internally... I am not sure how this plays with flows.
t
Thanks Rishi
g
Hi Laura, I may lack some knowledge so apologies if the questions are trivial 😄 by OTP Security code injection from text message, do you mean the phone auto-filling the code from text in this case? or something else perhaps?
t
That’s correct
Currently we have the descope flows presented in a next.js web app.
g
gotcha, the auto-fill /autocomplete for SMS is a browser feature, and can be applied regardless the metaf-ramework (next/react/angular/vanilla/etc) it should work also in Descope flows one small note is that unfortunately - it is not working well in Safari browser there is an open issue in Apple developer forum that we are tracking to solve this https://developer.apple.com/forums/thread/724620 if there are any more gaps - I would love to hear 🙂
t
interesting.
The video I provided is in safari, showing this working for Amex yesterday.
Is there something we need to be doing in our add code to trigger the autofill
Because in tests with chrome we are not seeing the auto fill behavior.
f
@thousands-alarm-31103 Let us get back to you. I think this might be how we handle flows inside browser.
t
That works. Thank you 🙂
Following up —
It looks like the flow widget would need to have a parameter for autocomplete and then the flows dashboard would need to make that a config option. Solution looking something like: • Enable autofill: Web developers can enable autofill functionality by setting the
autocomplete
attribute of the input field to “one-time-code” or “one-time-password”. • Code autofill: When the input field has the “autocomplete” attribute set to “one-time-code” or “one-time-password”, modern browsers (such as Chrome, Firefox, Safari) may offer to autofill the code from the received SMS. The autofill feature typically triggers when the input field’s
name
,
id
, or
label
matches certain patterns or keywords. • JavaScript validation: To ensure the security and integrity of the code, web developers should implement JavaScript validation on the entered code. This validation can include length checks, format verification, and server-side verification to confirm the correctness of the code.
I’m happy to file a feature request focused on the functionality (not solution) if we need me to.