Skip to content

burkido/auto-read-otp

v3.0.0MIT

Build OTP verification screens in Jetpack Compose with auto-read-otp: a per-digit code input, SMS code reading through the SMS User Consent API and a resend countdown timer, plus migration from 1.x.

Changelog

3.0.0 (2026-10-30)

⚠ BREAKING CHANGES

  • otp-input and otp-timer are replaced by a single otp-ui artifact with the package com.burkido.otp.ui. Replace both dependencies with io.github.burkido:otp-ui and change com.burkido.otp.input and com.burkido.otp.timer imports to com.burkido.otp.ui.

Features

  • add an agent skill for building OTP screens with coding agents (6813521)

Code Refactoring

  • merge otp-input and otp-timer into otp-ui (6813521)

2.0.0 (2026-10-28)

⚠ BREAKING CHANGES

  • timer: rememberCountdownTimerState takes endTimeMillis instead of endDate, and gains an overload taking a Duration. CountdownTimerSize is now CountdownTimerDimensions without textSize, the size parameter is now dimensions, backgroundAlpha is removed, and CountdownTimerState exposes remaining as a Duration instead of getRemainingTimes().
  • input: the cell slot takes an OtpCellState instead of four parameters, and the built-in cells take state instead of char, focused and isError. textFieldState is renamed to state, inputTransformation is now an extra filter on top of the built-in one, style types are plain classes instead of data classes, and OtpInputFieldState is removed.
  • sms: SmsUserConsent is replaced by SmsUserConsentEffect. onOTPReceived is now onCodeReceived, smsCodeLength is now codeLength, and onError receives a SmsConsentError instead of a localized string.
  • packages moved from com.burkido.autoreadotp and com.burkido.otpinputkit.* to com.burkido.otp.sms, com.burkido.otp.input and com.burkido.otp.timer. The countdown timer is now in the otp-timer artifact.

Features

  • sample: add home screen with hero demo (31bff28)
  • sample: add new theme, shared UI components and icons (5697be3)
  • sample: add OTP design gallery (38da5f6)
  • sample: add playground with live configuration (9514f51)
  • sample: add sign-in flow demo (99b2f14)
  • sample: add SMS lab screen (24d2bd5)
  • sample: redesign sample app (52439f4)

Bug Fixes

  • input: decorator based field, autofill, accessibility, API cleanup (ac93172)
  • sms: secure consent flow, correct code parsing, typed errors (88f3be8)
  • timer: coroutine countdown, single text size, screen reader text (466e9e4)

Code Refactoring

  • rename modules and packages, split otp-timer (225b9db)

Changelog

All notable changes are listed here. Entries are generated by release-please from Conventional Commit messages.