refreshToken

suspend fun refreshToken(refreshToken: String): ERROR CLASS: Symbol not found for Result<com/okta/authfoundation/client/TokenInfo>

Attempt to refresh a token using the provided refresh token string.

On success, a TokenRefreshedEvent is emitted on events. If an IdTokenValidator is configured, the ID token is validated before the event is emitted.

Return

Result.success with the new TokenInfo, or Result.failure with:

Parameters

refreshToken

the refresh token string.

See also

for an overload that accepts additional request parameters.


suspend fun refreshToken(refreshToken: String, extraRequestParameters: Map<String, String>): ERROR CLASS: Symbol not found for Result<com/okta/authfoundation/client/TokenInfo>

Attempt to refresh a token using the provided refresh token string, forwarding additional form body parameters to the token endpoint.

Reserved keys (grant_type, client_id, refresh_token) are silently filtered out of extraRequestParameters and cannot be overridden.

On success, a TokenRefreshedEvent is emitted on events.

Return

Result.success with the new TokenInfo, or Result.failure with:

Parameters

refreshToken

the refresh token string.

extraRequestParameters

additional form parameters to include in the token request (e.g., mapOf("acr_values" to "urn:okta:loa:2fa:any")).