Refreshes the access token when a 401 is returned.
The current/expired token value is provided to assist refresh logic.
typedef TokenRefresher = Future<String?> Function(String? refreshToken);