79565498

Date: 2025-04-09 23:44:20
Score: 3.5
Natty:
Report link

After extensive troubleshooting, the issue was resolved thanks to the insight provided by @Doug Stevenson in the comments. Switching to the proper require("firebase-functions/v2/https") import and using the onCall((request) => { ... }) signature, along with accessing secrets/config via defineSecret/defineString and request.auth / request.data, completely resolved the contradictory auth: "VALID" + 401 error. The v1 compatibility layer seems to have issues correctly propagating the validated auth context in this scenario.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @Doug
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mars M