Steps to refresh:

  1. Go to Google cloud service accounts page and delete the current one
  2. Go to Firebase service account page and click ‘Create service account’ to create a new one
    1. Search for the new service account on the iam page, click the pencil to ‘Edit principal’ and add the ‘Secret Manager Admin’ role.
  3. Then click ‘Generate a new private key’ and download that.
  4. Go to Vercel environment variables dashboard and set the new private key for ‘PROD_FIREBASE_SERVICE_ACCOUNT_KEY’, (or dev) removing all spaces/newlines in the json
  5. Select all keys at Google cloud secret manager and give access to the new service account (created during step 2 and accessible from the service accounts page from step 1)
  6. Set your local environment variable to point at new service credential files