onLoginWithWebAuthnResult
About this command
After launching a FIDO2 authentication task (with the loginWithWebAuthn method), this method parses the resulting intent and if successful, the user receives a one-time authentication token.
An authentication callback task is then launched to exchange the token with the server for an access token. The access token can be retrieved with the onLoginCallbackResult method.
The WebAuthn feature must be enabled on your ReachFive account. |
Examples
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
// The code of the FIDO2 authentication request
WEBAUTHN_LOGIN_REQUEST_CODE -> {
client.onLoginWithWebAuthnResult(
intent = data,
scope = setOf("openid", "email", "profile", "full_write"),
failure = { error -> ... } // Return a ReachFive error
)
}
}
Parameters
The intent received after launching a FIDO2 task. |
|
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.
|