Releases: firebase/firebase-admin-python
Releases · firebase/firebase-admin-python
Firebase Admin Python SDK v2.14.0
- A new
project_managementAPI for managing apps in a Firebase project. - New
list_android_apps()andlist_ios_apps()methods for listing the existing apps in a project. - New
create_android_app()andcreate_ios_app()methods for creating new apps in a project. - New
AndroidAppandIosAppAPIs for updating individual apps.
Realtime Datbase
- Fixed a performance issue in the
db.listen()API where it was taking a long time to process large RTDB nodes. - Fixed how the SDK handles special characters in node names.
Cloud Messaging
messaging.AndroidNotificationtype now supports specifying achannel_idwhen sending messages to Android O devices. Thanks chemidy for the contribution- Improved error handling by requesting a more verbose error response from the FCM backend service.
Authentication
- Fixed the property
UserRecord.tokens_valid_after_timeso that it always returns an integer, and never returnsNone.
Firebase Admin Python SDK v2.13.0
Database
- The
db.Referencetype now provides alisten()API for receiving realtime update events from the Firebase Database. Thanks the-c0d3r and rizasif for the contributions. - The
db.reference()method now optionally takes a URL parameter. This can be used to access multiple Firebase Realtime Database instances in the same project more easily.
Cloud Messaging
- The
messaging.WebpushNotificationtype now supports additional parameters.
Firebase Admin Python SDK v2.12.0
- The Admin SDK can now read the Firebase/Google Cloud Platform project ID from both
GCLOUD_PROJECTandGOOGLE_CLOUD_PROJECTenvironment variables.
Authentication
- The Admin SDK can now create custom tokens without being initialized with service account credentials.
- The SDK now accepts a
serviceAccountIdapp option, which can be used to set just the client email of a service account. - When deployed in an environment managed by Google (e.g. Google App Engine), the SDK can auto discover a service account ID without any explicit configuration.
Firebase Admin Python SDK v2.11.0
- [added] A new
auth.import_users()API for importing users into Firebase Auth in bulk. - [fixed] The
db.Reference.update()function now accepts dictionaries withNonevalues. This can be used to delete child keys from a reference.
Firebase Admin Python SDK v2.10.0
Authentication
- A new
create_session_cookie()method for creating a session cookie from a Firebase ID token. - A new
verify_session_cookie()method for validating a given session cookie string. - The
authmodule now caches the public key certificates used to verify ID tokens and session cookies, thus avoiding a network call everytime a credential needs to be verified.
Cloud Messaging
- Added the
mutable_contentoptional field to themessaging.Apstype. This can be used to set themutable-contentproperty when sending FCM messages to APNs targets. - Added support for specifying arbitrary key-value fields in the
messaging.Apstype.
Firebase Admin Python SDK v2.9.1
Cloud Messaging
- [changed] Improved error handling in FCM by mapping more server-side
errors to client-side error codes. See documentation. - [changed] The
messagingmodule now supports specifying an HTTP timeout
for all egress requests. Pass thehttpTimeoutoption
tofirebase_admin.initialize_app()before invoking any functions in
messaging.
Firebase Admin Python SDK v2.9.0
Firebase Cloud Messaging
- A new
firebase_admin.messaging
module for sendingmessagingmessages and managing topic subscriptions. - A new
send()
function for sendingmessagingmessages. - A new
subscribe_to_topic()
function for subscribing a list of device registration tokens to a
messagingtopic. - A new
unsubscribe_from_topic()
function for unsubscribing a list of device registration tokens from a
messagingtopic.
Firebase Auth
- The
verify_id_token()
function now accepts an optionalcheck_revokedparameter. WhenTrue, an
additional check is performed to see whether the token has been revoked. - A new
revoke_refresh_tokens()
function to invalidate all tokens issued to a user. - A new
tokens_valid_after_timestampproperty has been added to the
UserRecord
class to indicate the time before which tokens are not valid.
Firebase Admin Python SDK v2.8.0
Initialization
- The
initialize_app()method can now be invoked without any arguments. This will initialize an app using Google Application Default Credentials, and other options loaded from theFIREBASE_CONFIGenvironment variable.
Database
- The
db.Reference.get()method now accepts an optionalshallowargument. If set toTruethis will cause the SDK to execute a shallow read, which does not retrieve the child node values of the current reference.
Firebase Admin Python SDK v2.7.0
- A new
instance_idAPI that facilitates deleting instance IDs and associated user data from Firebase projects.
Firebase Admin Python SDK v2.6.0
Authentication
- Added the
list_users()function to thefirebase_admin.authmodule. This function enables listing or iterating over all user accounts in a Firebase project. - Added the
set_custom_user_claims()function to thefirebase_admin.authmodule. This function enables setting custom claims on a Firebase user. The custom claims can be accessed via that user's ID token.
Database
- Updated the
start_at(),end_at()andequal_to()methods of thedb.Queryclass so they can accept empty string arguments.