Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/simplesocialauthlib/providers/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def exchange_code_for_access_token(self, code: str) -> str:
response.raise_for_status()
token_response = response.json()
if "access_token" not in token_response:
logger.error(f"Invalid token response: {token_response}")
logger.error("Invalid token response: missing 'access_token' field")
raise CodeExchangeError("Invalid token response: missing 'access_token'")
return cast(str, token_response["access_token"])

Expand Down
4 changes: 2 additions & 2 deletions src/simplesocialauthlib/providers/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def exchange_code_for_access_token(self, code: str) -> str:
code=code,
)
if "id_token" not in token:
logger.error(f"Invalid token response: {token}")
logger.error("Invalid token response: missing 'id_token' field")
raise CodeExchangeError("Invalid token response: missing 'id_token'")
return cast(str, token["id_token"])

Expand All @@ -94,7 +94,7 @@ def retrieve_user_data(self, access_token: str) -> GoogleUserData:
),
)
if "accounts.google.com" not in id_info.get("iss", ""):
logger.error(f"Invalid token issuer: {id_info.get('iss')}")
logger.error("Invalid token issuer detected")
raise ValueError("Invalid token issuer")

return GoogleUserData(
Expand Down