Retrieves an access token. If a cached token is available and not expired, it is returned. Otherwise, a new token is fetched with refresh token if refresh grant is available.
A Result containing the access token or an error.