File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ export async function requireAuth(
96
96
skipAutoAuth : boolean = false ,
97
97
) : Promise < string | null > {
98
98
lastOptions = options ;
99
- api . setScopes ( [ scopes . CLOUD_PLATFORM , scopes . FIREBASE_PLATFORM ] ) ;
99
+ const requiredScopes = [ scopes . CLOUD_PLATFORM ] ;
100
+ if ( isFirebaseStudio ( ) ) {
101
+ requiredScopes . push ( scopes . USERINFO_EMAIL ) ;
102
+ }
103
+ api . setScopes ( requiredScopes ) ;
100
104
options . authScopes = api . getScopes ( ) ;
101
105
102
106
const tokens = options . tokens as Tokens | undefined ;
Original file line number Diff line number Diff line change 1
1
// default scopes
2
2
export const OPENID = "openid" ;
3
3
export const EMAIL = "email" ;
4
+ export const USERINFO_EMAIL = "https://www.googleapis.com/auth/userinfo.email" ;
4
5
export const CLOUD_PROJECTS_READONLY =
5
6
"https://www.googleapis.com/auth/cloudplatformprojects.readonly" ;
6
7
export const FIREBASE_PLATFORM = "https://www.googleapis.com/auth/firebase" ;
You can’t perform that action at this time.
0 commit comments