Skip to content

Commit

Permalink
Merge pull request #704 from khamaileon/master
Browse files Browse the repository at this point in the history
Fix #703 invalid_client error with Spotify backend
  • Loading branch information
omab committed Aug 14, 2015
2 parents b3e2543 + e4072e0 commit 588cfe1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions social/backends/spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class SpotifyOAuth2(BaseOAuth2):
]

def auth_headers(self):
auth_str = '{0}:{1}'.format(*self.get_key_and_secret())
b64_auth_str = base64.urlsafe_b64encode(auth_str.encode()).decode()
return {
'Authorization': 'Basic {0}'.format(base64.urlsafe_b64encode(
('{0}:{1}'.format(*self.get_key_and_secret()).encode())
))
'Authorization': 'Basic {0}'.format(b64_auth_str)
}

def get_user_details(self, response):
Expand Down

0 comments on commit 588cfe1

Please sign in to comment.