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(
9696 skipAutoAuth : boolean = false ,
9797) : Promise < string | null > {
9898 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 ) ;
100104 options . authScopes = api . getScopes ( ) ;
101105
102106 const tokens = options . tokens as Tokens | undefined ;
Original file line number Diff line number Diff line change 11// default scopes
22export const OPENID = "openid" ;
33export const EMAIL = "email" ;
4+ export const USERINFO_EMAIL = "https://www.googleapis.com/auth/userinfo.email" ;
45export const CLOUD_PROJECTS_READONLY =
56 "https://www.googleapis.com/auth/cloudplatformprojects.readonly" ;
67export const FIREBASE_PLATFORM = "https://www.googleapis.com/auth/firebase" ;
You can’t perform that action at this time.
0 commit comments