- [added] Added new
send_all()andsend_multicast()APIs to themessasingmodule. - [added] Added a new
auth.DELETE_ATTRIBUTEsentinel value, which can be used to deletephone_number,display_name,photo_urlandcustom_claimsattributes from a user account. It is now recommended to use this sentinel value over passingNonefor deleting attributes.
- [added] Added
generate_password_reset_link(),generate_email_verification_link()andgenerate_sign_in_with_email_link()methods to theauthAPI. - [added] Migrated the
authuser management API to the new Identity Toolkit endpoint. - [fixed] Extending HTTP retries to more HTTP methods like POST and PATCH.
- [added] Implemented HTTP retries. The SDK now retries HTTP calls on low-level connection and socket read errors, as well as HTTP 500 and 503 errors.
- [changed] Taking a direct dependency on
google-api-core[grpc]in order to resolve some long standing Firestore installation problems. messaging.WebpushConfigclass now supports configuring additional [added] FCM options for the features supported by the web SDK. A newmessaging.WebpushFcmOptionstype has been introduced for this purpose.- [added]
messaging.Apsclass now supports configuring a critical sound. A newmessaging.CriticalSoundclass has been introduced for this purpose. - [changed] Dropped support for Python 3.3.
- [added] A new
project_managementAPI for managing apps in a project. - [added]
messaging.AndroidNotificationtype now supportschannel_id. - [fixed] FCM errors sent by the back-end now include more details that are helpful when debugging problems.
- [fixed] Fixing error handling in FCM. The SDK now checks the key type.googleapis.com/google.firebase.fcm.v1.FcmError to set error code.
- [fixed] Ensuring that
UserRecord.tokens_valid_after_timealways returns an integer, and never returnsNone. - [fixed] Fixing a performance issue in the
db.listen()API where it was taking a long time to process large RTDB nodes.
- [added] The
db.Referencetype now provides alisten()API for receiving realtime update events from the Firebase Database. - [added] The
db.reference()method now optionally takes aurlparameter. This can be used to access multiple Firebase Databases in the same project more easily. - [added] The
messaging.WebpushNotificationtype now supports additional parameters.
- [added] Implemented the ability to create custom tokens without service account credentials.
- [added] Admin SDK can now read the project ID from both
GCLOUD_PROJECTandGOOGLE_CLOUD_PROJECTenvironment variables.
- [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.
- [added] A new
create_session_cookie()method for creating a long-lived session cookie given a valid ID token. - [added] A new
verify_session_cookie()method for verifying a given cookie string is valid. - [added]
authmodule now caches the public key certificates used to verify ID tokens and sessions cookies. This enables the SDK to avoid making a network call everytime a credential needs to be verified. - [added] Added the
mutable_contentoptional field to themessaging.Apstype. - [added] Added support for specifying arbitrary custom key-value
fields in the
messaging.Apstype.
- [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 inmessaging.
- [feature] Added the
firebase_admin.messagingmodule for sending Firebase notifications and managing topic subscriptions.
- [added] The 'verify_id_token()'
function now accepts an optional
check_revokedparameter. WhenTrue, an additional check is performed to see whether the token has been revoked. - [added] A new 'auth.revoke_refresh_tokens(uid)' function has been added to invalidate all tokens issued to a user.
- [added] A new
tokens_valid_after_timestampproperty has been added to the 'UserRecord', class indicating the time before which tokens are not valid.
- [added] The
initialize_app()method can now be invoked without any arguments. This initializes an app using Google Application Default Credentials, and other options loaded from theFIREBASE_CONFIGenvironment variable.
- [added] The
db.Reference.get()method now accepts an optionalshallowargument. If set toTruethis causes the SDK to execute a shallow read, which does not retrieve the child node values of the current reference.
- [added] A new
instance_idAPI that facilitates deleting instance IDs and associated user data from Firebase projects.
- [added] Added the
list_users()function to thefirebase_admin.authmodule. This function enables listing or iterating over all user accounts in a Firebase project. - [added] 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.
- [changed] Updated the
start_at(),end_at()andequal_to()methods of thedb.Queryclass so they can accept empty string arguments.
- [added] A new
FirestoreAPI that enables access to Cloud Firestore databases.
- [added] The
db.Referenceclass now has aget_if_changed()method, which retrieves a database value only if the value has changed since last read. - [added] The options dictionary passed to
initialize_app()function can now contain anhttpTimeoutoption, which sets the timeout (in seconds) for outbound HTTP connections started by the SDK.
- [added] You can now get the ETag value of a database reference by passing
etag=Trueto theget()method of adb.Referenceobject. - [added] The
db.Referenceclass now has aset_if_unchanged()method, which you can use to write to a database location only when the location has the ETag value you specify. - [changed] Fixed an issue with the
transaction()method that prevented you from updating scalar values in a transaction.
- [added] A new Cloud Storage API
that facilitates accessing Google Cloud Storage buckets using the
google-cloud-storagelibrary.
- [added] A new user management API that allows provisioning and managing
Firebase users from Python applications. This API adds
get_user(),get_user_by_email(),get_user_by_phone_number(),create_user(),update_user()anddelete_dser()methods to thefirebase_admin.authmodule.
- [added] The
db.Referenceclass now exposes atransaction()method, which can be used to execute atomic updates on database references.
- [changed] Constructors of
CertificateandRefreshTokencredential types can now be invoked with either a file path or a parsed JSON object. This facilitates the consumption of service account credentials and refresh token credentials from sources other than the local file system. - [changed] Better integration with the
google-authlibrary for making authenticated HTTP requests from the SDK.
- [added] A new database API that facilitates basic data manipulation operations (create, read, update and delete), and advanced queries. Currently, this API does not support realtime event listeners. See Add the Firebase Admin SDK to your Server to get started.
- [changed] This SDK has been migrated from
oauth2clientto the newgoogle-authlibrary.
- [changed] This SDK now supports verifying ID tokens when initialized with application default credentials.
- [added] Initial release of the Admin Python SDK. See Add the Firebase Admin SDK to your Server to get started.
- [added] Implemented the
firebase_adminmodule, which provides theinitialize_app()function for initializing the SDK with a credential. - [added] Implemented the
firebase_admin.credentialsmodule, which contains constructors forCertificate,ApplicationDefaultandRefreshTokencredential types.
- [added] Implemented the
firebase_admin.authmodule, which providescreate_custom_token()andverify_id_token()functions for minting custom authentication tokens and verifying Firebase ID tokens.