Skip to content

Instantly share code, notes, and snippets.

@hiranya911
Last active November 26, 2017 22:56
Show Gist options
  • Save hiranya911/7da3b21041e780a87323bc18b628bc73 to your computer and use it in GitHub Desktop.
Save hiranya911/7da3b21041e780a87323bc18b628bc73 to your computer and use it in GitHub Desktop.
Firebase Java Admin SDK - Init with ADC
public static void initWithAppDefaultCredentials() {
// ADC does not require any explicit credential files.
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.getApplicationDefault())
.build();
FirebaseApp.initializeApp(options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment