Open
Conversation
…558) * fix(fcm): FA workaround for the concurrency issues in googleapiclient * fix: Added test case
* fix(auth): check if user disabled on check_revoked When `verify_session_cookie` or `verify_id_token` is called with `check_revoked` set to `True` we should also check if the user is disabled. If disabled the `UserDisabledError` is raised.
The `firebase_admin.auth.list_users().iterate_all()` method uses a sub-class of PageIterator, which happens to access the .items computed property more than once for every page of results. This has been changed so we take care not to access the `self.items` property more than once per page. This is a lot faster.
* [add] ability to delete provider in auth * [fix] pylint * [fix] tests * [fix] tests * fix comments * fix tests * fix lint * [fix] address comments
* fix: Fixing a broken integration test * fix: Fixing another typo
Bumped version to 5.1.0
Provides an option for developers to specify the OAuth response type for their OIDC provider (either one of these can be set:): - id_token - code (if set, must also set the client secret) RELEASE NOTES: Added support for configuring the authorization code flow for OIDC providers.
Co-authored-by: Ryan Kohler <ryankohler@google.com>
* Add delayed response message for holidays * Remove the table from the markdown
* chore: Update Node.js version in CI workflow - Firebase CLI dropped support for Node.js 10. Updating the Node.js version to 12 for emulator test setup. * Update ci.yml Update the version to current LTS 16
* feat(firestore): Expose Async Firestore Client. (#621) * feat(firestore): Expose Async Firestore Client. * fix: Added type hints and defintion wording changes * fix: removed future annotations until Python 3.6 is depreciated. * fix: added missed type and clarifying comment for Python 3.6 type hinting. * fix: lint * Adds integration tests for the Async Firstore module (#623) * Add integration tests for async firstore module * fix: made pytest Python 3.6 compatible * Trigger Integration Tests * fix: correct copyright year * Add code snippets for firestore modules. (#628) * Add code snippets for firestore modules. * fix: clarified snippet names and fixed newline. * fix: Removed var tags. These won't work as I intended it to since html is escaped when using includecode. Co-authored-by: Lahiru Maramba <llahiru@gmail.com>
* chore: Add unit tests for `Reference.listen()` * Integration test for rtdb listeners * fix lint
* feat(fcm): Support `proxy` field in FCM `AndroidNotification` * fix lint * fix: Update `proxy` and `visibility` doc string with TW suggestion
…873) Updated the 'Supported Python Versions' section in README.md to indicate that Python 3.7 and Python 3.8 support is deprecated, advising users to use Python 3.9 or higher. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
… tests (#881) * Fix(tests): Use mock time for consistent token generation and verification tests Patches time.time and google.auth.jwt._helpers.utcnow to use a fixed timestamp (MOCK_CURRENT_TIME) throughout tests/test_token_gen.py. This addresses test flakiness and inconsistencies by ensuring that: 1. Tokens and cookies are generated with predictable `iat` and `exp` claims based on MOCK_CURRENT_TIME. 2. The verification logic within the Firebase Admin SDK and the underlying google-auth library also uses MOCK_CURRENT_TIME. Helper functions _get_id_token and _get_session_cookie were updated to default to using MOCK_CURRENT_TIME for their internal time calculations, simplifying test code. Relevant fixtures and token definitions were updated to rely on these new defaults and the fixed timestamp. The setup_method in TestVerifyIdToken, TestVerifySessionCookie, TestCertificateCaching, and TestCertificateFetchTimeout now mock time.time and google.auth.jwt._helpers.utcnow to ensure that all time-sensitive operations during testing use the MOCK_CURRENT_TIME. * Fix(tests): Apply time mocking to test_tenant_mgt.py Extends the time mocking strategy (using a fixed MOCK_CURRENT_TIME) to tests in `tests/test_tenant_mgt.py` to ensure consistency with changes previously made in `tests/test_token_gen.py`. Specifically: - Imported `MOCK_CURRENT_TIME` from `tests.test_token_gen`. - Added `setup_method` (and `teardown_method`) to the `TestVerifyIdToken` and `TestCreateCustomToken` classes. - These setup methods patch `time.time` and `google.auth.jwt._helpers.utcnow` to return `MOCK_CURRENT_TIME` (or its datetime equivalent). This ensures that token generation (for custom tokens) and token verification within `test_tenant_mgt.py` align with the mocked timeline, preventing potential flakiness or failures due to time inconsistencies. All tests in `test_tenant_mgt.py` pass with these changes. * fix lint and refactor --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Add live_activity_token to `APNSConfig`, allowing you to specify this token for APNS messages. This change introduces: - Adding the `live_activity_token` field to the `APNSConfig` class - Updated unit test to verify that the `live_activity_token` is correctly included in the encoded message * Refactor and edit doc string --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Lahiru Maramba <llahiru@gmail.com> Co-authored-by: Jonathan Edey <145066863+jonathanedey@users.noreply.github.com>
…or FCM async and HTTP/2 support (#882) * Added minimal support for sending FCM messages in async using HTTP/2 (#870) * httpx async_send_each prototype * Clean up code and lint * fix: Add extra dependancy for http2 * fix: reset message batch limit to 500 * fix: Add new import to `setup.py` * Refactored retry config into `_retry.py` and added support for exponential backoff and `Retry-After` header (#871) * Refactored retry config to `_retry.py` and added support for backoff and Retry-After * Added unit tests for `_retry.py` * Updated unit tests for HTTPX request errors * Address review comments * Added `HttpxAsyncClient` wrapper for `httpx.AsyncClient` and support for `send_each_for_multicast_async()` (#878) * Refactored retry config to `_retry.py` and added support for backoff and Retry-After * Added unit tests for `_retry.py` * Updated unit tests for HTTPX request errors * Add HttpxAsyncClient to wrap httpx.AsyncClient * Added forced refresh to google auth credential flow and fixed lint * Added unit tests for `GoogleAuthCredentialFlow` and `HttpxAsyncClient` * Removed duplicate export * Added support for `send_each_for_multicast_async()` and updated doc string and type hints * Remove duplicate auth class * Cover auth request error case when `requests` request fails in HTTPX auth flow * Update test for `send_each_for_multicast_async()` * Address review comments * fix lint and some types * Address review comments and removed unused code * Update metric header test logic for `TestHttpxAsyncClient` * Add `send_each_for_multicast_async` to `__all__` * Apply suggestions from TW review
… flaky unit test` (#896)
* change(fcm): Remove deprecated FCM APIs (#890) * chore(deps): Bump minimum supported Python version to 3.9 and add 3.13 to CIs (#892) * chore(deps): Bump minimum supported Python version to 3.9 and add 3.13 to CIs * fix deprecation warnings * fix GHA build status svg * fix: Correctly scope async eventloop * fix: Bump pylint to v2.7.4 and astroid to v2.5.8 to fix lint issues * fix ml tests * fix lint * fix: remove commented code * change(ml): Drop AutoML model support (#894) * chore: Bump `pylint` to v3.3.7 and `astroid` to v3.3.10 (#895) * chore: Bump pylint to v3 * chore: fix src lint * chore: fix unit test lint * chore: fix integration test lint * chore: fix snippets lint * chore: 2nd pass for errors * fix: corrected use of the `bad-functions` config * fix: add EoF newline * chore: Upgraded Google API Core, Cloud Firestore, and Cloud Storage dependencies (#897) * chore: Bump dependencies * fix: Also update setup.py * fix(functions): Remove usage of deprecated `datetime.utcnow() and fix flaky unit test` (#896)
…eprecate `dynamic_link_domain` (#884) * Add link_domain to ActionCodeSettings; update encode_action_code_settings to handle link_domain * Add handling for InvalidHostingLinkDomainError * Add deprecation warning for dynamic_link_domain * Update error message for InvalidHostingLinkDomainError * Fix lint * Add type hints to ActionCodeSettings * Fix f-string lint
…t with this repository (#906)
* fix(functions): Refresh credentials before enqueueing task This change addresses an issue where enqueueing a task from a Cloud Function would fail with a InvalidArgumentError error. This was caused by uninitialized credentials being used to in the task payload. The fix explicitly refreshes the credential before accessing the credential, ensuring a valid token or service account email is used in the in the task payload. This also includes a correction for an f-string typo in the Authorization header construction. * fix(functions): Move credential refresh to functions service init * fix(functions): Moved credential refresh to run on task payload update with freshness guard --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* feat(functions): Enable Cloud Task Queue Emulator support * fix: lint * fix: Resolved issues from gemini review * chore: Added basic integration tests for task enqueue and delete * chore: Setup emulator testing for Functions integration tests * fix: Re-added accidentally removed lint * fix: integration test default apps * fix: lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )