I am trying to invoke http cloud function from angular app deployed on App engine. Access required to invoke the cloud function from app engine is done i.e- provided invoke access to the cloud function from the service account associated with the app engine. Added CORS allow access in the cloud function. The official documentation Authenticate function invocation My task requires to generate token programatically and the documentation uses nodejs client library which uses gcloud auth library. I am unable to figure out the workaround of this code for angular application. My question is whether this task is achievable and how can it be achieved?
Asked
Active
Viewed 178 times
0
-
Are your users authenticated? – guillaume blaquiere Sep 02 '21 at 14:50
-
@guillaumeblaquiere I have provided the cloud function access to the service account associated with the app engine. App engine is the user/invoker of cloud function in my case. Please refer this image [service account invoke authentication](https://drive.google.com/file/d/1UzdLKyYnuUlPe0HeaS8945BM-jgiuGsS/view?usp=sharing) Thanks! – aj56 Sep 03 '21 at 07:56
-
It's not my question. App Engine doesn't invoke your Cloud Functions, it's the user browser, because Angular app run on the browser and not on App Engine. That's why, your users perform the request and they must be authenticated to be able to call the secured Cloud Functions. Thus my question: is your user authenticated? And how? – guillaume blaquiere Sep 03 '21 at 08:15