Firebase Auth Emulator interferes with Firebase Storage
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- authentication, backend
Research direction
Start by reading src/main/java/com/google/firebase/auth/internal/Utils.java and src/main/java/com/google/firebase/ImplFirebaseTrampolines.java, especially the FIREBASE_AUTH_EMULATOR_HOST and emulator-credential handling. Reproduce the issue with Auth and Storage enabled together, then verify that Storage calls remain authorized while emulator credentials apply only to Auth; also check whether separate FirebaseApp instances can differ in emulator configuration.
Written by the indexing model from the issue text.
Description
[READ] Step 1: Are you in the right place?
- For issues or feature requests related to the code in this repository
file a Github issue.- If this is a feature request make sure the issue title starts with "FR:".
- For general technical questions, post a question on StackOverflow
with the firebase tag. - For general Firebase discussion, use the firebase-talk
google group. - For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Operating System version: Windows 11
- Firebase SDK version: ____
- Library version: 9.1.1
- Firebase Product: auth, storage
[REQUIRED] Step 3: Describe the problem
We access the Auth and Storage services in our project using this Java Admin SDK.
Recently, we wanted to make use of the Auth Emulator for development purposes. However, after enabling the emulator by setting the FIREBASE_AUTH_EMULATOR_HOST environment variable, the Storage calls stop working and return 401 Unauthorized.
It seems that by setting the FIREBASE_AUTH_EMULATOR_HOST environment variable, the whole project enters an emulator mode and uses emulator credentials. The emulator credentials should be made to only apply to Auth calls.
Furthermore, I could not even find a way to create two instances of FirebaseApps (one with the emulator enabled and one disabled), since the check for FIREBASE_AUTH_EMULATOR_HOST is static and shared program-wide.
Steps to reproduce:
Use Auth and Storage in a production project. Enable FIREBASE_AUTH_EMULATOR_HOST and Storage stops working.
- Dominant language
- Java
- Stars
- 620
- Forks
- 305
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 4
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
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1152 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·