refreshTokens abstract method
note: should ONLY throw DioException
or AuthRestException.
AuthRestException is for when refresh token is invalidated.
DioException
is for other type of errors like when server is
down or a socket exception occurs.
note: this method should not have any side effects. should NOT do anything other than making request, such as writing to storage ...
Implementation
Future<AuthToken> refreshTokens(AuthToken token);