onLoginCallbackResult
client.onLoginCallbackResult(intent, resultCode, success, failure)
About this command
After launching an authentication callback task where an one-time authentication token is sent to the server, this method will parse the resulting intent and if successful, the user will get an authentication token.
Examples
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
// The code of the authentication redirection
REDIRECTION_REQUEST_CODE -> {
client.onLoginWithWebAuthnResult(
intent = data,
resultCode = resultCode,
success = { authToken -> ... }, // Get the profile's authentication token
failure = { error -> ... } // Return a ReachFive error
)
}
}
Parameters
The intent received after launching the activity to retrieve the authentication callback result. |
|
Identifies the return result of the authentication callback when the result arrives. |
|
Callback called once the authentication callback has succeeded. You’ll get an |
|
Callback called once the request has failed. You’ll get a |
Response
Type: Unit
AuthToken
The authentication token.
idToken |
The ID token JSON Web Token (JWT) that contains the profile’s information. |
||||||||||||||||||||||||||||||||||
accessToken |
The authorization credential JSON Web Token (JWT) used to access the ReachFive API. |
||||||||||||||||||||||||||||||||||
refreshToken |
The refresh token JSON Web Token (JWT) used to obtain new access tokens once they expire. |
||||||||||||||||||||||||||||||||||
tokenType |
The type of token. Always equal to |
||||||||||||||||||||||||||||||||||
expiresIn |
The lifetime in seconds of the access token. If |
||||||||||||||||||||||||||||||||||
user OpenIDUser |
The user’s information contained in the ID token.
|
ReachFiveError
message |
The message of the error. |
||||||||||||||
code |
The HTTP status code. |
||||||||||||||
exception |
The stack trace of the error. |
||||||||||||||
data |
Additional data about the error.
|