lib/spaceship/client.rb in spaceship-0.32.1 vs lib/spaceship/client.rb in spaceship-0.32.2

- old
+ new

@@ -291,10 +291,11 @@ when 403 raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username." when 200 return response else - if response["Location"] == "/auth" # redirect to 2 step auth page + location = response["Location"] + if location && URI.parse(location).path == "/auth" # redirect to 2 step auth page handle_two_step(response) return true elsif (response.body || "").include?('invalid="true"') # User Credentials are wrong raise InvalidUserCredentialsError.new, "Invalid username and password combination. Used '#{user}' as the username."