onAddNewWebAuthnDeviceResult
client.onAddNewWebAuthnDeviceResult( authToken, intent, successWithNoContent, failure )
About this command
After launching a FIDO2 registration task (with the addNewWebAuthnDevice method), this method will parse the resulting intent and if successful, the new device will be added in the user’s registered FIDO2 devices.
|
Examples
import com.reach5.identity.sdk.core.models.AuthToken
val profileAuthToken: AuthToken = // Here paste the authorization token of the profile retrieved after login
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
// The code of the FIDO2 registration request
WEBAUTHN_REGISTER_REQUEST_CODE -> {
client.onAddNewWebAuthnDeviceResult(
authToken = profileAuthToken,
intent = data,
successWithNoContent = { _ -> ... }, // Do something
failure = { error -> ... } // Return a ReachFive error
)
}
}
Parameters
Authorization token of the profile retrieved from login.
|
|||||||||||||
The intent received after launching a FIDO2 task. |
|||||||||||||
Callback called once the request has succeeded. No argument is expected. |
|||||||||||||
Callback called once the request has failed. You’ll get a |
Response
Type: Unit
ReachFiveError
message |
The message of the error. |
|||||||||||||||||||||||||||||||||||||||
code |
The code from the underlying WebAuthn library.
|
|||||||||||||||||||||||||||||||||||||||
exception |
The stack trace of the error. |
|||||||||||||||||||||||||||||||||||||||
data |
Additional data about the error.
|