endStepUp
client.endStepUp( challengeId, verificationCode, success, failure, activity, // Optional arguments trustDevice )
About this command
Logs in a user by initiating the authentication code flow, ending the step up flow. This is executed when a user uses the SMS verification code or clicks the link provided in the email.
| The Passwordless feature must be enabled on your ReachFive Console account. The SMS feature must be enabled on your ReachFive Console account if the profile can choose a phone number to login. |
Examples
import com.reach5.identity.sdk.core.models.AuthToken
import com.reach5.identity.sdk.core.models.Profile
val authToken: AuthToken = // The authentication token obtained from login or signup.
client.endStepUp(
challengeId: "m3DaoT...7Rzp1m",
verificationCode: "123456"
success = { _ -> ... }, // Do something
failure = { error -> ... }, // Handle a ReachFive error
activity = activity,
trustDevice = true
)
Parameters
The Android activity. |
|||
The code challenge ID to verify the user. |
|||
Boolean indicating if the device should be trusted or not.
Defaults to
|
|||
Callback called once the request has failed. You’ll get a |
|||
Callback called once the request has succeeded. |
|||
The verification code sent by email or SMS. |
Response
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. |
||||||||||||||||||||||||||||||||||
The step up token used to continue the step up flow and validate the user for authentication purposes. This only applies for MFA flows. |
|||||||||||||||||||||||||||||||||||
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. |
||||||||||||||
getErrorCode() |
The error code’s enumeration value. |
||||||||||||||
code |
The HTTP status code or SDK error code. See Android SDK errors for more details. |
||||||||||||||
exception |
The stack trace of the error. |
||||||||||||||
data |
Additional data about the error.
|