performAction

abstract suspend fun performAction(context: Context, tokenState: TokenState, action: suspend (String?, String?) -> Unit): TokenState?

Perform an action with the tokens. If the token is expired, it will perform the refresh the tokens, and then perform the action. This will also update the token in the data store as well.

Return

Updated TokenState instance.

Parameters

context

The Context instance.

tokenState

The TokenState instance.

action

The action to perform.