Skip to content

saveIdentityAsync

suspend fun saveIdentityAsync(sessionId: String, authFactor: AuthFactor, rawTMRSymKey: ByteArray, identity: ByteArray, challenge: String? = null): SaveIdentityResponse

Save the Seald account to SSKS.

Return

A SaveIdentityResponse instance, containing the SSSKS ID of the stored identity, which can be used by your backend to manage it, and if a challenge was passed authenticatedSessionId, a new authenticated sessionId, that you can use to perform further SSKS TMR operations without challenge.

Parameters

sessionIdSession ID given by SSKS to your app's server.
authFactorAuthentication method of this user, to which SSKS has sent a challenge at the request of your app's server.
rawTMRSymKeyThe raw encryption key used to encrypt / decrypt the stored identity keys. This MUST be a cryptographically random buffer of 64 bytes.
identityThe identity to save.
challengeOptional. The challenge sent by SSKS to the user's authentication method, if any.

Throws

SealdException