You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A string is accepted for compatibility, all non-empty string values enable the HTTP REST fallback.
126
112
*/
127
113
fallback?: boolean|string;
128
114
}={}
129
115
){
130
-
if(!isNodeJS()){
131
-
if(!options.auth){
132
-
thrownewError(
133
-
JSON.stringify(options)+
134
-
'You need to pass auth instance to use gRPC-fallback client in browser or other non-Node.js environments. Use OAuth2Client from google-auth-library.'
135
-
);
136
-
}
137
-
this.auth=options.authasOAuth2Client;
116
+
if(options.auth){
117
+
this.auth=options.auth;
118
+
}elseif('authClient'inoptions){
119
+
this.auth=options.authClient;
120
+
}elseif(!isNodeJS()){
121
+
thrownewError(
122
+
JSON.stringify(options)+
123
+
'You need to pass auth instance to use gRPC-fallback client in browser or other non-Node.js environments. Provide a `GoogleAuth` or `AuthClient` instance from `google-auth-library`.'
0 commit comments