Firebase Admin Java SDK Release Notes

To see release notes for the Firebase console and for other Firebase platforms and related SDKs, see the Firebase Release Notes.

Version 6.1.0 - May 15, 2018

Authentication

  • Deprecated the incorrectly named setCustomClaims() method. Developers should instead use the setCustomUserClaims() method.

Version 6.0.0 - May 8, 2018

  • FirebaseAuth, FirebaseMessaging, and FirebaseInstanceId interfaces now expose a set of blocking methods. Each operation has blocking and asynchronous versions.
  • Removed the deprecated FirebaseCredential interface.
  • Removed the deprecated Task interface along with the com.google.firebase.tasks package.
  • Dropped support for App Engine's Java 7 runtime. Developers are advised to use the Admin SDK with Java 8 when deploying to App Engine.
  • Removed the deprecated FirebaseDatabase.setLogLevel() API and related logging utilities. Developers should use SLF4J to configure logging directly.

    For more detail on these breaking changes, see the Admin SDK Migration Guide.

Version 5.11.0 - April 25, 2018

  • Upgraded the Google Cloud Firestore dependency version to 0.45.0-beta.
  • Upgraded the Google Cloud Storage dependency version to 1.27.0.
  • Upgraded the Netty dependency version to 4.1.22.

Authentication

Version 5.10.0 - April 17, 2018

Initialization

  • Added the setConnectTimeout() and setReadTimeout() methods to the FirebaseOptions.Builder class. These methods enable configuring timeouts for outgoing HTTP requests made by the SDK. These settings affect all requests except for the requests made to Firebase Realtime Database and Cloud Firestore.

Cloud Messaging

  • Added the setMutableContent() method to the Aps.Builder class. This can be used to set the mutable-content property when sending FCM messages to APNs targets.
  • Added support for specifying arbitrary key-value fields in the Aps.Builder class.
  • Improved error handling in the FirebaseMessaging API.

Authentication

  • The FirebaseAuth API now uses the HttpTransport configured via FirebaseOptions to fetch public key certificates when verifying ID tokens. Thanks xbauquet for the contribution.

Version 5.9.0 - February 14, 2018

Cloud Messaging

Authentication

  • The verifyIdTokenAsync() method now has an overload that accepts a boolean checkRevoked parameter. When true, an additional check is performed to see whether the token has been revoked.
  • A new revokeRefreshTokensAsync() mathod to invalidate all tokens issued to a user.
  • The UserRecord class introduces a new getTokensValidAfterTimestamp() method to return the time before which tokens are not valid.

Realtime Database

  • Exceptions thrown by database event handlers are now logged.

Cloud Firestore

  • Upgraded the Cloud Firestore client to the latest available version.

Initialization

  • The FirebaseOptions.Builder.setStorageBucket() method now throws a clear exception when invoked with a bucket URL instead of the name.
  • Implemented a fix for a potential Guava version conflict which was causing an IllegalStateException (precondition failure) in some environments.

Version 5.8.0 - January 11, 2018

Initialization

  • The FirebaseApp.initializeApp() method now provides an overload that does not require any arguments. This initializes an app using Google Application Default Credentials, and other FirebaseOptions loaded from the FIREBASE_CONFIG environment variable.

Authentication

  • Improved error handling in user management APIs in the FirebaseAuth class. These operations now throw exceptions with well-defined error codes.

Realtime Database

  • The SDK now serializes large whole double values as longs when appropriate.

Version 5.7.0 - December 21, 2017

  • A new FirebaseInstanceId API that facilitates deleting instance IDs and associated user data from Firebase projects.

Authentication

  • No longer using org.json dependency in Authentication APIs, which makes it easier to use the API in environments with conflicting JSON libraries.

Version 5.6.0 - December 08, 2017

  • Upgraded the version of Google API Common dependency to the latest (1.2.0).

Authentication

  • Added the listUsersAsync() method to the FirebaseAuth class. This method enables listing or iterating over all user accounts in a Firebase project.
  • Added the setCustomUserClaimsAsync() method to the FirebaseAuth class. This method enables setting custom claims on a Firebase user. The custom claims can be accessed via that user's ID token.

Realtime Database

  • Re-implemented the WebSocket communication layer of the Realtime Database client using Netty.

Version 5.5.0 - November 07, 2017

Realtime Database

Version 5.4.0 - October 11, 2017

  • A new ThreadManager API that can be used to specify the thread pool and the ThreadFactory that should be used by the SDK.
  • All APIs that support asynchronous operations now return an ApiFuture. The old Task API has been deprecated. For each method x() that returns a Task, a new xAsync() method that returns an ApiFuture has been introduced.
  • The SDK now guarantees the graceful termination of all started threads. In most environments, the SDK will use daemons for all background activities. The developer can also initiate a graceful termination of threads by calling FirebaseApp.delete().

Initialization

Version 5.3.1 - September 13, 2017

Authentication

  • Throwing an accurate and more detailed error from verifyIdToken() in the event of a low-level exception.

Realtime Database

  • Proper handling and logging of exceptions thrown by the onComplete() event of transaction handlers.

Version 5.3.0 - August 14, 2017

Authentication

  • Added the method getUserByPhoneNumber() to the FirebaseAuth interface. This method enables retrieving user profile information by a phone number.
  • CreateRequest and UpdateRequest types now provide setters for specifying a phone number, which can be used to create users with a phone number field and/or update the phone number associated with a user.
  • Added the getPhoneNumber() method to UserRecord, which exposes the phone number associated with a user account.
  • Added the getPhoneNumber() method to UserInfo, which exposes the phone number associated with a user account by a linked identity provider.

Realtime Database

  • Deprecated the FirebaseDatabase.setLogLevel() method. Use SLF4J to configure logging.
  • Logging a detailed error when the database client fails to authenticate with the backend Firebase servers.

Version 5.2.0 - June 14, 2017

  • New factory methods in the FirebaseCredentials class that accept HttpTransport and JsonFactory arguments. These settings are used when the credentials make HTTP calls to obtain OAuth2 access tokens.
  • New setHttpTransport() and setJsonFactory() methods in the FirebaseOptions class. These settings are used by all services of the SDK except FirebaseDatabase.

Version 5.1.0 - June 07, 2017

Authentication

  • A new user management API that allows provisioning and managing Firebase users from Java applications. This API adds getUser(), getUserByEmail(), createUser(), updateUser() and deleteUser() methods to the FirebaseAuth interface.

Version 5.0.1 - June 01, 2017

Realtime Database

  • Fixed a database API thread leak that made the SDK unstable when running in the Google App Engine environment.

Version 5.0.0 - May 17, 2017

Initialization

  • Factory methods in FirebaseCredentials class can now throw IOExceptions, providing fail-fast semantics while facilitating simpler error handling.
  • The deprecated setServiceAccount() method has been removed from the FirebaseOptions.Builder class in favor of the setCredential() method.
  • Trying to initialize the SDK without setting a credential now results in an exception.
  • The FirebaseCredential interface now returns a new GoogleOAuthAccessToken type, which encapsulates both token string and its expiry time.

Version 4.1.7 - April 20, 2017

  • Introducing a new FirebaseApp.delete() method, which can be used to gracefully shut down app instances. All app invocations after a call to delete() will throw exceptions. Deleted app instances can also be re-initialized with the same name if necessary.

  • Upgraded SDK dependencies. Guava, Google API Client, and JSON libraries that the SDK depends on have been upgraded to more recent versions.

Version 4.1.6 - April 04, 2017

Realtime Database

  • Updated the SDK to select the correct thread pool implementation when running on a regular JVM with App Engine libraries in the classpath.

Version 4.1.5 - March 28, 2017

Realtime Database

  • Fixed the invalid SDK version constant in the FirebaseDatabase class that was released in v4.1.4.

Version 4.1.4 - March 28, 2017

Authentication

  • Updated the SDK to periodically refresh the OAuth access token internally used by FirebaseApp. This reduces the number of authentication failures encountered at runtime by various SDK components (e.g. Realtime Database) to nearly zero. This feature is active by default when running in typical Java environments, or the Google App Engine environment with background threads support.

Version 4.1.3 - March 7, 2017

Realtime Database

  • Updated Realtime Database to properly swap out the ID token used to authenticate the underlying websocket when a new ID token is generated. The websocket connection is still disconnected and reconnected every hour when an ID token expires unless you manually call getAccessToken on the FirebaseCredential used to authenticate the SDK. In a future release, the SDK will proactively refresh ID tokens automatically before they expire.

Version 4.1.2 - February 14, 2017

Initialization

  • Updated initalizeApp() to synchronously read from an InputStream to avoid issues with closing the stream after initializing the SDK.
  • Improved confusing error messages when initializing the SDK with a null or malformed InputStream.

Version 4.1.1 - February 1, 2017

Authentication

  • Fixed a dependency issue which caused the verifyIdToken() method to always throw an exception.

Version 4.1.0 - January 24, 2017

Initialization

Authentication

  • The verifyIdToken() method is broken in this release and throws an exception due to an incorrect dependency. This was fixed in version 4.1.1.

Version 4.0.4 - January 17, 2017

  • Fixed issue which caused threads to be terminated in Google App Engine after 24 hours, rendering the SDK unresponsive.
  • Fixed issues which caused asynchronous task execution to fail on automatically-scaled Google App Engine instances.

Authentication

  • Improved error messages and added App Engine support for the verifyIdToken() method.

Realtime Database

  • Fixed a race condition which could occur when new writes are added while the connection is being closed.

Version 4.0.3 - December 6, 2016

Initialization

  • Fixed an issue that caused a null input to the setDatabaseAuthVariableOverride() method to be ignored, which caused the app to still have full admin access. Now, passing this value has the expected behavior: the app has unauthenticated access to the Realtime Database, and behaves as if no user is logged into the app.

Realtime Database

  • Use of the updateChildren() method now only cancels transactions that are directly included in the updated paths (not transactions in adjacent paths). For example, an update at /move for a child node walk will cancel transactions at /, /move, and /move/walk and in any child nodes under /move/walk. But, it will no longer cancel transactions at sibling nodes, such as /move/run.

Version 4.0.2 - November 15, 2016

  • This update restores Java 7 compatibilty for the Admin Java SDK.

Version 4.0.1 - November 8, 2016

  • Fixed an issue with a missing dependency in the 4.0.0 JAR which caused the Database API to not work.
  • This version was compiled for Java 8 and does not support Java 7. This was fixed in version 4.0.2.

Version 4.0.0 - November 7, 2016

  • The Admin Java SDK (available on Maven as firebase-admin) replaces the pre-existing firebase-server-sdk Maven package, which is now deprecated. See Add the Firebase Admin SDK to your Server to get started.
  • This version is missing a dependency which causes the Database API to not work. This was fixed in version 4.0.1.
  • This version was compiled for Java 8 and does not support Java 7. This was fixed in version 4.0.2.

Authentication

  • The createCustomToken() method is now asynchronous, returning a Task<String> instead of a String.

Send feedback about...

Need help? Visit our support page.