Steps to refresh:
- Go to Google cloud service accounts page and delete the current one
- Go to Firebase service account page and click ‘Create service account’ to create a new one
- Search for the new service account on the iam page, click the pencil to ‘Edit principal’ and add the ‘Secret Manager Admin’ role.
- Then click ‘Generate a new private key’ and download that.
- 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
- 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)
- Set your local environment variable to point at new service credential files