Skip to content

fix(oauth2): validate Firebase issuer/subject and warn on omitted audience in verify_firebase_token - #18777

Open
macastelaz wants to merge 9 commits into
mainfrom
fix/verify-firebase-token-issuer
Open

macastelaz wants to merge 9 commits into
mainfrom
fix/verify-firebase-token-issuer

Conversation

@macastelaz

@macastelaz macastelaz commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Validates that the decoded Firebase ID token contains non-empty string aud and sub claims and that iss matches https://securetoken.google.com/<aud>, and emits a UserWarning when audience is omitted in verify_firebase_token() (both sync and async).

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request enhances security in both the synchronous and asynchronous implementations of verify_firebase_token by validating the token's audience (aud) and issuer (iss) claims. It also introduces a warning when the function is called without an audience, as this can be insecure. Comprehensive unit tests have been added to verify these validations and warnings. I have no additional feedback to provide as the changes are well-implemented and properly tested.

@macastelaz macastelaz changed the title fix(oauth2): validate Firebase issuer and warn on omitted audience in verify_firebase_token fix(oauth2): validate Firebase issuer/subject and warn on omitted audience in verify_firebase_token Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant