Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By burkidov3.0.0MITIn 1 marketplace
Add per-digit OTP code fields, automatic SMS code reading and a resend countdown to Jetpack Compose screens. Requires minSdk 24 and Jetpack Compose; SMS reading goes through Google's SMS User Consent API, so the user taps Allow once.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
otp, sms-verification, verification-code, countdown-timer, sms-user-consent, compose-ui, sms
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Jetpack Compose building blocks for one-time code screens: an OTP input with a cell per digit, automatic SMS reading through Google's SMS User Consent API, and a countdown timer for code expiry.
A real SMS sent to an emulator. The user taps Allow once, and the code fills itself in.
See seven designs built with it ↓
| Artifact | What it gives you |
|---|---|
otp-ui | OtpInputField with default, outlined and underline cells, masking, autofill and screen reader support, plus CountdownTimer, a HH : MM : SS countdown that hides itself when time is up |
otp-sms | SmsUserConsentEffect, which reads the code from the next SMS after the user agrees. No SMS permission needed |
otp-bom | Keeps both on matching versions |
API reference: burkido.github.io/auto-read-otp
The libraries are on Maven Central, so no extra repository is needed. They require minSdk 24, compileSdk 37 and Jetpack Compose.
In gradle/libs.versions.toml:
[versions]
otp = "3.0.0"
[libraries]
otp-bom = { module = "io.github.burkido:otp-bom", version.ref = "otp" }
otp-ui = { module = "io.github.burkido:otp-ui" }
otp-sms = { module = "io.github.burkido:otp-sms" }
In your module's build.gradle.kts, add only the parts you use:
dependencies {
implementation(platform(libs.otp.bom))
implementation(libs.otp.ui)
implementation(libs.otp.sms)
}
Without a version catalog:
dependencies {
implementation(platform("io.github.burkido:otp-bom:3.0.0"))
implementation("io.github.burkido:otp-ui")
implementation("io.github.burkido:otp-sms")
}
Coming from 2.0.0? otp-input and otp-timer are now one artifact, otp-ui. Coming from 1.x? Coordinates, packages and several APIs changed. The migration guide covers both.
@Composable
fun VerifyScreen(onVerify: (String) -> Unit, onResend: () -> Unit) {
val code = rememberTextFieldState()
var attempt by rememberSaveable { mutableIntStateOf(0) }
var canResend by rememberSaveable { mutableStateOf(false) }
var expiresAt by rememberSaveable { mutableLongStateOf(System.currentTimeMillis() + 2.minutes.inWholeMilliseconds) }
val timer = rememberCountdownTimerState(endTimeMillis = expiresAt)
OtpInputField(
state = code,
otpLength = 6,
onComplete = onVerify,
)
SmsUserConsentEffect(
codeLength = 6,
onCodeReceive = { received -> code.fillOtp(received, 6) },
onError = { error -> Log.w("Verify", "No code from SMS: $error") },
restartKey = attempt,
)
CountdownTimer(state = timer, onTimerFinish = { canResend = true })
TextButton(
enabled = canResend,
onClick = {
code.clearOtp()
attempt++
expiresAt = System.currentTimeMillis() + 2.minutes.inWholeMilliseconds
canResend = false
onResend()
},
) {
Text("Resend code")
}
}
The sample module shows each part of the library on its own and all of them working together. It's the quickest way to see what the library can do before you write any code.
![]() | ![]() | ![]() | ![]() |
| Home | Sign-in flow | Playground | SMS lab |
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Indexed from v3.0.0Marketplace JSON
npx claudepluginhub burkido/auto-read-otp --plugin auto-read-otpPlugins from other owners that cover similar ground