Open Bindslev opened 3 months ago
To anyone stumbling upon this issue, authType and authId actually works using emulators. Remember to use emulators for all firebase services for them to connect. I did it like this:
await FirebaseAuth.instance.useAuthEmulator('192.168.0.153', 9099);
FirebaseFirestore.instance.useFirestoreEmulator('192.168.0.153', 8080);
await FirebaseStorage.instance.useStorageEmulator('192.168.0.153', 9199);
FirebaseFunctions.instance.useFunctionsEmulator('192.168.0.153', 5001);
Seems like it wasn't working anyway. I thought I authorized using the emulator but even after adding these lines of code it still somehow authorized without emulator and now after getting the emulator to work with all of these firebase products, the auth doesn't produce the userId I was expecting
+1
This is WAI (the change was adding the types & payload template but not the dependency getting the values ). I'd change the type to FR.
Notes for impl: As an initial option , the emulator context has the jwt token - we can check if it has the information.
Hey @Bindslev. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
@JU-2094 @harshyyy21 what kind of feedback do you need?
Just tested with latest firebase-tools v13.15.3 and is always returning :"authType": "unknown" | "authId": "fake-auth-id@gmail.com"
This is limiting us to use functionality since we can not test locally
We have the same issue. Makes it very hard to test some features locally.
Same issue here. I can log in and sign up from within my app locally, but can't test responsive code with auth context because const { authType, authId } = event; always returns authType: unknown, authId: fake-auth-id@gmail.com
Same issue here. I can log in and sign up from within my app locally, but can't test responsive code with auth context because const { authType, authId } = event; always returns
authType: unknown, authId: fake-auth-id@gmail.com
Thumbs up on the issue to get traction. Same for @IIlllII and @aendel
Hey @Bindslev. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Hey @Bindslev. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
oss-bot aka spam-bot ☝️☝️☝️☝️
Posting for recent activity. +1 for attention
+1 also experiencing.
Updating to respond to the type being changed. This is not a feature request. The expectation of getting actual FirestoreAuthEvent info from the emulator seems reasonable.
Related issues
[REQUIRED] Version info
node:
v18.8.0
firebase-functions: firebase function: v2
firebase-tools:
firebase version: 13.12.0
firebase-admin:
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
I haven't found any documentation about this not working in the emulator, so I suppose it happens for everybody?
[REQUIRED] Expected behavior
I was expecting for the authType to not be unknown, and be able to retrieve the authenticated users ID using event.authId
[REQUIRED] Actual behavior
I get this:
authType: 'unknown', authId: 'fake-auth-id@gmail.com'
Were you able to successfully deploy your functions?
Yes