Bladeren bron

when you set site= in ActiveResource::Base, it parses out the password and username out of that and sets it internally. so when we clear the session here, we should also clear those flags, otherwise you end up with unexpected authentication headers down the line

Oren Mazor 8 jaren geleden
bovenliggende
commit
e7b51cc625
1 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. 2 0
      lib/shopify_api/resources/base.rb

+ 2 - 0
lib/shopify_api/resources/base.rb

@@ -58,6 +58,8 @@ module ShopifyAPI
 
       def clear_session
         self.site = nil
+        self.password = nil
+        self.user = nil
         self.headers.delete('X-Shopify-Access-Token')
       end