withVKIDToken

fun <T> ApiCommand<T>.withVKIDToken(refreshTokenParamsProvider: () -> VKIDRefreshTokenParams = { VKIDRefreshTokenParams {} }): ApiCommand<T>

Add compatibility for vk-android-sdk with vkid-android-sdk to the request.

This adds two things:

  • Automatically uses VKID access token for the request

  • Refreshes access token if necessary

This extension adds two exceptions as the possible outcomes:

Parameters

refreshTokenParamsProvider

Providers parameters for token refreshing. This can be useful if you want to generate PKCE parameters yourself.