Xamarincommunitytoolkit: [Enhancement] OTP Autofill Control

Created on 16 Oct 2020  路  1Comment  路  Source: xamarin/XamarinCommunityToolkit

Summary

Inspired by https://blog.verslu.is/xamarin/xamarin-forms-xamarin/otp-auto-fill-entry-for-ios-with-xamarin-forms/

API Changes

Add new OTPAutofillControl
It should contain Entry and Request Button

Entry should be autofilled on SMS received
RequestButton should run the command which requests OTP Code (up to user)

iOS:
Entry - extend Entry render with Control.TextContentType = UITextContentType.OneTimeCode;

Android: (https://www.c-sharpcorner.com/article/verify-otp-automatically-in-android-without-sms-read-permission-using-xamarin-fo/)
We should use SMS Retriever API

WHY we should implement SMS Retriever API
From Jan 9th, 2019 Google removed apps from playstore with permissions READ SMS AND CALL LOG, if they don鈥檛 explain the necessity
Advantages of SMS Retriever API

  • From now not every app with READ SMS permission can access your personal data like messages.
  • Usually, to auto-fill OTP we give access to an android app. With SMS Retriever API apps won鈥檛 ask for READ SMS permission to auto-fill OTP.

Intended Use Case

Who Will Do The Work?

  • [ ] I am willing to take this on myself
  • [ ] Just putting this out there for someone to pick up
feature-request

Most helpful comment

Wouldn't it be better to just create an effect for this? Instead of an entire control? Then you could easily attach the OTP logic to any Entry.

>All comments

Wouldn't it be better to just create an effect for this? Instead of an entire control? Then you could easily attach the OTP logic to any Entry.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jBijsterboschNL picture jBijsterboschNL  路  5Comments

knocte picture knocte  路  5Comments

rdelrosario picture rdelrosario  路  3Comments

hnabbasi picture hnabbasi  路  6Comments

mhrastegary77 picture mhrastegary77  路  3Comments