DEV Community

Discussion on: Permission error when generating a custom token on Cloud Functions

Collapse
 
elyngved profile image
Erik Lyngved • Edited

I was having the same issue, and I finally solved it by adding the "Service Account Token Creator" role to the "App Engine default service account" (PROJECT-ID@appspot.gserviceaccount...). I'm not sure why my cloud function is picking up that account instead of the "Google Cloud Functions Service Agent" but that solved this painful issue for me.

Collapse
 
julienreszka profile image
Julien Henri RESZKA

This did work for me too

Collapse
 
kobayashiharuto profile image
GleamingCake

Thanks!!!