diff --git a/lib/auth0/client.rb b/lib/auth0/client.rb index c8deabb2..8f4f0a9c 100644 --- a/lib/auth0/client.rb +++ b/lib/auth0/client.rb @@ -1,3 +1,4 @@ +require 'uri' require 'httparty' class Auth0Client @@ -31,7 +32,10 @@ def get_connections end def delete_user(id) - response = self.class.delete("/api/users/#{id}", { headers: @headers }) + fail "#{__method__}: No id" if id.to_s.empty? + + uri = URI.escape("/api/users/#{id}") + response = self.class.delete(uri, { headers: @headers }) response.body end