Parse GOOGLE_APPLICATION_CREDENTIALS as JSON if it begins with '{'
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- authentication
Research direction
Start by locating where GOOGLE_APPLICATION_CREDENTIALS is read and where service-account credentials are loaded in the Java SDK. Trace the existing file-path flow, then verify that values beginning with '{' are treated as credential JSON while other values remain file paths; done means both input forms work without committing a credentials file.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
I do not want to commit my credentials file to github, and when running my app inside another enviroment such as Heroku, i run into the trouble because even though i can specify ENV variables i must provide a file path for GOOGLE_APPLICATION_CREDENTIALS, which is inconvenient because im using git to deploy to heroku
Describe the solution you'd like
Parse GOOGLE_APPLICATION_CREDENTIALS as JSON if it begins with '{', otherwise assume is a file path.
Describe alternatives you've considered
Adding additional code that reads an env var which contains the credential json, this is inconvenient because i will need to copy and paste this code for all my projects that use firebase admin
fun createApp(): FirebaseApp {
val credentials = System.getenv("FIREBASE_CONFIG")
.byteInputStream()
.use { stream -> ServiceAccountCredentials.fromStream(stream) }
val config = FirebaseOptions.builder()
.setCredentials(credentials)
.build()
return FirebaseApp.initializeApp(config)
}
- Dominant language
- Java
- Stars
- 620
- Forks
- 305
- Avg merge
- 3h 23m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-java
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 comments · 1 assignee ·
-
api: remoteconfig
firebase/firebase-admin-java#1196 · 1 comment · 2 assignees ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
firebase/firebase-admin-java#1192 · 3 comments ·
-
needs-triage type: feature request
Difficulty 3/5 1-2 days Newbie friendliness 45/100
firebase/firebase-admin-java#1149 · 1 comment ·
All issues in firebase/firebase-admin-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#157 ·
-
enhancement Tools
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
apache/rocketmq-dashboard#5008 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
DETECT_PARAMETER_NAMES=false silently disables @ConstructorProperties-based Creator detection too Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
FasterXML/jackson-databind#6229 ·