Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c9eb67e
fix: issue 3785. Add id_token field and fill it when available in the…
guillaumeblaquiere Dec 2, 2025
f1c74e7
test: add id_token in test
guillaumeblaquiere Dec 2, 2025
3744fb0
Merge branch 'main' into fix-3785
guillaumeblaquiere Dec 3, 2025
f153943
Merge branch 'main' into fix-3785
guillaumeblaquiere Dec 4, 2025
c208c77
chore: autoformat.sh
guillaumeblaquiere Dec 5, 2025
d5c5319
Merge branch 'main' into fix-3785
guillaumeblaquiere Dec 5, 2025
aa430c7
Merge branch 'main' into fix-3785
guillaumeblaquiere Dec 8, 2025
54d4d00
Merge branch 'main' into fix-3785
guillaumeblaquiere Dec 10, 2025
feaf945
Merge branch 'main' into fix-3785
guillaumeblaquiere Dec 12, 2025
abc3e08
Merge branch 'main' into fix-3785
guillaumeblaquiere Dec 15, 2025
fc8d1b3
Merge branch 'main' into fix-3785
guillaumeblaquiere Dec 26, 2025
2381c91
Merge branch 'main' into fix-3785
guillaumeblaquiere Jan 5, 2026
60ee6b3
Merge branch 'main' into fix-3785
guillaumeblaquiere Jan 11, 2026
2ef4782
Merge branch 'main' into fix-3785
guillaumeblaquiere Jan 18, 2026
a223d26
Merge branch 'main' into fix-3785
guillaumeblaquiere Jan 21, 2026
d5f6142
Merge branch 'main' into fix-3785
guillaumeblaquiere Jan 21, 2026
77eaa98
Merge branch 'main' into fix-3785
guillaumeblaquiere Jan 22, 2026
2973e2c
chore: fix unit test
guillaumeblaquiere Jan 24, 2026
65b78b5
Merge branch 'main' into fix-3785
guillaumeblaquiere Feb 2, 2026
2ad63b1
Merge branch 'main' into fix-3785
guillaumeblaquiere Feb 10, 2026
828d0d0
Merge branch 'main' into fix-3785
guillaumeblaquiere Feb 18, 2026
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
1 change: 1 addition & 0 deletions src/google/adk/auth/auth_credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class OAuth2Auth(BaseModelWithConfig):
auth_response_uri: Optional[str] = None
auth_code: Optional[str] = None
access_token: Optional[str] = None
id_token: Optional[str] = None
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding id_token: Optional[str] = None to the OAuth2Auth class is a direct and necessary change to support the id_token in the OIDC flow, as described in the PR. This correctly extends the data model to accommodate the new token type.

refresh_token: Optional[str] = None
expires_at: Optional[int] = None
expires_in: Optional[int] = None
Expand Down
1 change: 1 addition & 0 deletions src/google/adk/auth/oauth2_credential_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def update_credential_with_tokens(
"""
auth_credential.oauth2.access_token = tokens.get("access_token")
auth_credential.oauth2.refresh_token = tokens.get("refresh_token")
auth_credential.oauth2.id_token = tokens.get("id_token", None)
Comment thread
rohityan marked this conversation as resolved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Populating the id_token field from the tokens dictionary is crucial for making the id_token available after an OAuth2/OIDC exchange. This change directly implements the solution for issue #3785.

auth_credential.oauth2.expires_at = (
int(tokens.get("expires_at")) if tokens.get("expires_at") else None
)
Expand Down