Skip to content

Commit

Permalink
Make AppleID work with multiple identifiers
Browse files Browse the repository at this point in the history
When creating an application that uses 1 backend and multiple frontends (webapp and iOS), the backend needs to know to what App ID or Service ID you want the access token from Apple.
  • Loading branch information
nossila authored and nijel committed Jan 26, 2024
1 parent 9d3ba91 commit a5a34d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions social_core/backends/apple.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_private_key(self):

def generate_client_secret(self):
now = int(time.time())
client_id = self.setting("CLIENT")
client_id = self.data.get("client_id", self.setting("CLIENT"))
team_id = self.setting("TEAM")
key_id = self.setting("KEY")
private_key = self.get_private_key()
Expand All @@ -92,7 +92,7 @@ def generate_client_secret(self):
return jwt.encode(payload, key=private_key, algorithm="ES256", headers=headers)

def get_key_and_secret(self):
client_id = self.setting("CLIENT")
client_id = self.data.get("client_id", self.setting("CLIENT"))
client_secret = self.generate_client_secret()
return client_id, client_secret

Expand Down

0 comments on commit a5a34d5

Please sign in to comment.