Automatically refresh OAuth2 token when it has expired.