pub async fn auto_refresh_token<F, Fut>(
token: &mut TokenData,
refresh: F,
) -> Result<()>Expand description
Check if a token is expired and refresh it if needed.
Calls refresh only when token.is_expired() returns true. The caller is
responsible for persisting the new token.