firebase-tools
firebase-tools copied to clipboard
Functions v2 authType is 'unknown' when using emulator
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
- Sign up to firebase auth / firestore / functions
- Create a login page
- Create a function that is triggered on a firestore collection write/update/delete
- Use "onDocumentUpdatedWithAuthContext" or any of the other methods with the AuthContext
- Notice that event.authType is unknown when developing locally using the firebase emulator after the use is logged in and authenticated
[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: '[email protected]'
Were you able to successfully deploy your functions?
Yes