Skip to content

Commit a5a34d5

Browse files
nossilanijel
authored andcommittedJan 26, 2024
Make AppleID work with multiple identifiers
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.
1 parent 9d3ba91 commit a5a34d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎social_core/backends/apple.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def get_private_key(self):
7575

7676
def generate_client_secret(self):
7777
now = int(time.time())
78-
client_id = self.setting("CLIENT")
78+
client_id = self.data.get("client_id", self.setting("CLIENT"))
7979
team_id = self.setting("TEAM")
8080
key_id = self.setting("KEY")
8181
private_key = self.get_private_key()
@@ -92,7 +92,7 @@ def generate_client_secret(self):
9292
return jwt.encode(payload, key=private_key, algorithm="ES256", headers=headers)
9393

9494
def get_key_and_secret(self):
95-
client_id = self.setting("CLIENT")
95+
client_id = self.data.get("client_id", self.setting("CLIENT"))
9696
client_secret = self.generate_client_secret()
9797
return client_id, client_secret
9898

0 commit comments

Comments
 (0)
Please sign in to comment.