Skip to main content

Helper resource

This function facilitates the upload of a logo into your application in a single call. Below are examples for different platforms.

// Returns Unit
sdk.helper().uploadPlatformLogo(
applicationId = APPLICATION_ID,
contentType = "CONTENT_TYPE",
image = INPUT_STREAM
)

Assisted login​

Performs the standard login process in a single call. It performs the login, generates a new key pair when needed, and attempts to register the ephemeral key. If that registration is rejected because the user must verify their identity, it falls back to secondary authentication.

info
  • When used successfully, the cloud auth token, cloud refresh token, and the generated key pair are added to the context manager and automatically stored in secure storage.
  • If the response has requiresVerification = true, the caller must invoke verify ephemeral key registration with the code received by the user (email, SMS, or telephone) to complete the process.
  • If the response has requiresRetry = true, the secondary authentication endpoint was rate-limited and the caller should retry later.

Response​

FieldTypeDescription
requiresVerificationBooleantrue when the caller must complete secondary authentication via verifyEphemeralKeyRegistration
requiresRetryBooleantrue when the request was rate-limited and the caller should retry later
// Returns an AssistedLoginResponse
val response = sdk.helper().assistedLogin(
email = "EMAIL",
password = "PASSWORD"
)

Assisted register ephemeral key​

Registers an ephemeral key in a single call. It first tries the standard register ephemeral key endpoint and, if that is rejected because the account is locked, automatically falls back to secondary authentication.

info
  • If your context manager already has a public and private key, you can pass null for those parameters, and the values will be retrieved from the context manager instead.
  • If the response has requiresVerification = true, the caller must invoke verify ephemeral key registration with the code received by the user (email, SMS, or telephone) to complete the process.
  • If the response has requiresRetry = true, the secondary authentication endpoint was rate-limited and the caller should retry later.

Response​

FieldTypeDescription
requiresVerificationBooleantrue when the caller must complete secondary authentication via verifyEphemeralKeyRegistration
requiresRetryBooleantrue when the request was rate-limited and the caller should retry later
// Returns an AssistedRegisterEphemeralKeyResponse
val response = sdk.helper().assistedRegisterEphemeralKey(KEY_PAIR)