typebot.io icon indicating copy to clipboard operation
typebot.io copied to clipboard

OTP Code Input

Open jwalsh-bdt opened this issue 10 months ago • 3 comments

Is your feature request related to a problem? Please describe. Add an OTP code input that allows a user to request and verify an OTP code

Describe the solution you'd like

  • As a user, I want to be able to use an OTP code to verify access to my email, phone, etc. as well authenticate via OTP code.
  • The code length should be configurable and should adjust the number of input boxes accordingly.
  • I want to be able to request an OTP code via an API, store the OTP code received in a variable and compare it to a code that a user enters
  • I want to be able to copy and paste a code sent to my phone and have it populate into each input box.
  • I should be able to request a new code be sent if I don't receive it

Describe alternatives you've considered Embedding a third party OTP screen is less useful.

jwalsh-bdt avatar Feb 02 '25 19:02 jwalsh-bdt

Thanks for the suggestion, we should have discuss about it first to avoid unnecessary work 😅

In my opinion, your implementation not embracing the chat paradigm. This kind of input's job should only be to capture a code, nothing else. Any other logic should be made in the typebot flow after that.

I would also rename it to a more agnostic name: Pin. And I'd recommend using the accessible corresponding input provided by Ark UI: https://ark-ui.com/react/docs/components/pin-input.

baptisteArno avatar Feb 03 '25 14:02 baptisteArno

The reason for the additional integration is to be able to re-request a pin if they dont receive one the first time. I’d be happy to solve this a different way if you have ideas. Right now, without a way to either call an API to request a new PIN or have a way to ‘jump’ back to a block that handles that integration the user could get stuck 

Get Outlook for iOS

 From: Baptiste Arnaud @.>Sent: Monday, February 3, 2025 9:39 AMTo: baptisteArno/typebot.io @.>Cc: John Walsh @.>; Author @.>Subject: Re: [baptisteArno/typebot.io] OTP Code Input (Issue #1985)  Thanks for the suggestion, we should have discuss about it first to avoid unnecessary work 😅 In my opinion, your implementation not embracing the chat paradigm. This kind of input's job should only be to capture a code, nothing else. Any other logic should be made in the typebot flow after that. I would also rename it to a more agnostic name: Pin. And I'd recommend using the accessible corresponding input provided by Ark UI: https://ark-ui.com/react/docs/components/pin-input.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***> Get Outlook for iOS

jwalsh-bdt avatar Feb 03 '25 18:02 jwalsh-bdt

That's a good point but still, every input should be usecase-agnostic I'd say.

To solve your usecase we'd need a new feature indeed, but this has nothing to do with a Pin input

baptisteArno avatar Feb 04 '25 11:02 baptisteArno