Parse an otpauth:// URI and register the credential in the native store.
The URI string encoding the credential.
A promise that resolves to the newly created OathCredential.
OathError when the URI is invalid or a duplicate credential exists.
Remove a credential from the native OATH store.
Unique identifier for the credential to delete.
A promise that resolves to true when deletion succeeded.
OathError when the credential is not found or deletion fails.
Generate a one-time password for a credential.
Unique identifier for the credential.
A promise that resolves to the OTP string.
OathError when the credential is locked or code generation fails.
Generate a one-time password along with validity metadata.
Unique identifier for the credential.
A promise that resolves to an OathCodeInfo payload.
OathError when the credential is locked or code generation fails.
Retrieve a single credential by its identifier.
Unique identifier for the credential.
A promise that resolves to the OathCredential, or null if not found.
OathError on storage access failure.
Retrieve all credentials stored in the native OATH store.
A promise that resolves to an array of OathCredential objects.
OathError on storage access failure.
Persist an updated credential to the native OATH store.
The OathCredential object to save.
A promise that resolves to the saved OathCredential.
OathError when the credential is not found or storage fails.
Native-backed OATH client handle returned by createOathClient.
Remarks
The client holds a reference to a native OATH session. Call close when the client is no longer needed to release native resources. Any method called after
close()will throw an OathError witherror: 'OATH_STATE_ERROR'.Example