onSignupWithWebAuthnResult
client.onSignupWithWebAuthnResult( intent, webAuthnId, failure, // Optional arguments scope )
About this command
After launching a FIDO2 signup task (with the signupWithWebAuthn method), this method parses the resulting intent and if successful, registers the new user and sends a verification code or token to the provided email address.
The WebAuthn feature must be enabled on your ReachFive account. |
Examples
// The value of `webAuthnId` is retrieved from the `signupWithWebAuthn` method
private lateinit var webAuthnId: String
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
// The code of the FIDO2 signup request
WEBAUTHN_SIGNUP_REQUEST_CODE -> {
client.onSignupWithWebAuthnResult(
intent = data,
webAuthnId = this.webAuthnId,
scope = setOf("openid", "email", "profile", "full_write"),
failure = { error -> ... } // Return a ReachFive error
)
}
}
Parameters
The intent received after launching a FIDO2 task. |
|
The user identifier returned in the signup options. |
|
List of space-delimited, case-sensitive strings representing the requested scope. Default scopes are the allowed scopes set up in the client’s configuration. |
|
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.
|