Skip to content

Commit b066ce1

Browse files
authored
Ensure initialization w/CertCredential has needed scopes (#58)
While using CertCredential, against a newly issued Firebase Admin SDK private key, I am seeing scope failures getting the Firebase environment configuration. Adding `https://www.googleapis.com/auth/cloudruntimeconfig` to the `AUTH_SCOPES` allows this to function as expected. Further, we should allow access to all firebase w/admin-sdk credentials.
1 parent 0fd5628 commit b066ce1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/credential.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ const ONE_HOUR_IN_SECONDS = 60 * 60;
4444
const JWT_ALGORITHM = 'RS256';
4545
const AUTH_SCOPES = [
4646
'https://www.googleapis.com/auth/userinfo.email',
47-
'https://www.googleapis.com/auth/firebase.database',
47+
'https://www.googleapis.com/auth/cloudruntimeconfig',
48+
'https://www.googleapis.com/auth/firebase',
4849
];
4950

5051
/**

0 commit comments

Comments
 (0)