Last active
November 26, 2017 22:56
-
-
Save hiranya911/7da3b21041e780a87323bc18b628bc73 to your computer and use it in GitHub Desktop.
Firebase Java Admin SDK - Init with ADC
This file contains 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
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