Browse Source

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 years ago
parent
commit
e7b51cc625
1 changed files with 2 additions and 0 deletions
  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
       def clear_session
         self.site = nil
         self.site = nil
+        self.password = nil
+        self.user = nil
         self.headers.delete('X-Shopify-Access-Token')
         self.headers.delete('X-Shopify-Access-Token')
       end
       end