-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2 onRequest does not enforce AppCheck #1474
Comments
The just-add-water AppCheck integration is for callable functions, i.e ones created with onCall(), not onRequest(). As a workaround you can import the firebase-admin SDK and verify the X-Firebase-AppCheck header yourself. (If you use vscode or something else with typescript autocomplete, you'll see that enforceAppCheck is only a defined property on CallableOptions, not HttpsOptions). |
I am using WebStorm, and indeed it does show I think this is a bug then, specifically here:
Fixed in: #1477 |
Related issues
#1377
[REQUIRED] Version info
"firebase-admin":
"firebase-functions":
node: v18.15.0
firebase-functions: "4.4.1",
firebase-tools: 12.5.4
firebase-admin: "11.11.0",
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
Set up a cloud function using v2 onRequest, with
enforceAppCheck: true
[REQUIRED] Expected behavior
Calling the function (locally or when deployed) with the HTTP request should be blocked if no app check token is available
[REQUIRED] Actual behavior
Function works fine, same as #1377 without any token
Were you able to successfully deploy your functions?
yes
The text was updated successfully, but these errors were encountered: