Merge branch 'master' of https://github.com/DetectiveSquirrel/Pokemon-Go-Rocket-API
Brian [2016-07-25 16:56:08]
Merge branch 'master' of https://github.com/DetectiveSquirrel/Pokemon-Go-Rocket-API
diff --git a/PokemonGo/RocketAPI/Client.cs b/PokemonGo/RocketAPI/Client.cs
index f1f784d..417da81 100644
--- a/PokemonGo/RocketAPI/Client.cs
+++ b/PokemonGo/RocketAPI/Client.cs
@@ -90,7 +90,7 @@ namespace PokemonGo.RocketAPI
_authType = AuthType.Google;
GoogleLogin.TokenResponseModel tokenResponse = null;
- if (_settings.GoogleRefreshToken == string.Empty && AccessToken == string.Empty)
+ if (string.IsNullOrEmpty(_settings.GoogleRefreshToken) && string.IsNullOrEmpty(AccessToken))
{
var deviceCode = await GoogleLogin.GetDeviceCode();
tokenResponse = await GoogleLogin.GetAccessToken(deviceCode);
@@ -101,7 +101,7 @@ namespace PokemonGo.RocketAPI
}
else
{
- if (_settings.GoogleRefreshToken != null)
+ if (!string.IsNullOrEmpty(_settings.GoogleRefreshToken))
tokenResponse = await GoogleLogin.GetAccessToken(_settings.GoogleRefreshToken);
else
tokenResponse = await GoogleLogin.GetAccessToken(AccessToken);
You may download the files in Public Git.