freshAccessToken

suspend fun freshAccessToken(context: ERROR CLASS: Symbol not found for Context, force: Boolean = false): String?

Retrieves a fresh access token.

If the current access token is not expired, it will be returned. Otherwise, a fresh access token will be obtained using the refresh token.

Return

The fresh access token or null if an error occurs.

Parameters

context

The application context.

force

Flag indicating whether to force obtaining a fresh access token even if the current one is not expired.