start

abstract suspend fun start(idToken: String, deviceSecret: String, scope: List<String> = client.configuration.defaultScope, audience: String? = null): ERROR CLASS: Symbol not found for Result<ERROR CLASS: Symbol not found for TokenInfo>

Initiates the token exchange flow.

Return

Result.success with TokenInfo on success, or Result.failure with:

  • com.okta.authfoundation.client.OAuth2ClientResult.Error.OidcEndpointsNotAvailableException if endpoints are unavailable.

  • com.okta.authfoundation.client.OAuth2ClientResult.Error.HttpResponseException on server errors.

  • Other exceptions for network or parsing failures.

Parameters

idToken

the ID token for the user.

deviceSecret

the device secret obtained from a previous authentication flow.

scope

the scopes to request. If omitted, the client's configured default scopes are used.

audience

the resource server audience to request. When null (the default), no audience parameter is sent and the authorization server applies its own default.