start

abstract suspend fun start(idToken: String, deviceSecret: String, audience: String? = null, scope: String = "openid profile email offline_access"): 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.

audience

the audience of the authorization server. Defaults to api://default.

scope

the OAuth2 scopes to request.