TokenExchangeFlow
Deprecated
The Android-only TokenExchangeFlow is deprecated in favor of the KMP variant, which works on Android and JVM. Use com.okta.oauth2.kmp.TokenExchangeFlow instead. This class will be removed in a future major release.
An authentication flow class that implements the Token Exchange Flow.
As an example, consider SSO for Native Apps where a client exchanges the ID and the Device Secret tokens to get access to the resource.
See the specification
Constructors
Link copied to clipboard
constructor()
Initializes a token exchange flow.
Initializes a token exchange flow using the OidcConfiguration.
Functions
Link copied to clipboard
suspend fun start(idToken: String, deviceSecret: String, audience: String = "api://default", scope: String = client.configuration.defaultScope): OAuth2ClientResult<Token>
suspend fun start(idToken: String, deviceSecret: String, audience: String = "api://default", scope: List<String>): OAuth2ClientResult<Token>
Initiates the Token Exchange flow.