Skip to main content
SIM binding lets you tell whether the SIM currently in the device is the same one that was used during the last successful authentication. Use it to gate sensitive actions (payments, profile changes) or to force re-auth after a SIM swap. Available from otpless-headless-sdk v2.1.0. The feature is opt-in and disabled by default.

How it works

After a successful Silent Network Authentication (SNA) or SMS OTP auto-read, the SDK records a fingerprint and stores it into encrypted storage. checkSimBindingStatus() compares that fingerprint against the current SIM and returns true only when they match. The binding is written and cleared automatically:

Enable SIM binding

Set the toggle once, before starting authentication:

Check binding status

checkSimBindingStatus can be called without first calling OtplessSDK.initialize — pass an application Context directly.
Returns true only when a binding is stored and the current SIM matches it. Any exception is swallowed and the call returns false.

Clear the binding

Call after logout, account deletion, or whenever the user should be forced through a full auth again. Also callable without initialize.

API summary