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
The following code snippet shows how you can call the [Google Cloud PubSub API](https://cloud.google.com/pubsub/overview) using gRPC with a service account. The credentials are loaded from a key stored in a well-known location or by detecting that the application is running in an environment that can provide one automatically, e.g. Google Compute Engine. While this example is specific to Google and its services, similar patterns can be followed for other service providers.
369
341
@@ -398,7 +370,7 @@ var ssl_creds = grpc.credentials.createSsl(root_certs);
398
370
var stub =newhelloworld.Greeter('myservice.example.com', ssl_creds);
399
371
```
400
372
401
-
####Authenticate with Google using scopeless credentials (recommended approach)
373
+
####Authenticate with Google
402
374
403
375
```js
404
376
// Authenticating with Google
@@ -412,24 +384,6 @@ var ssl_creds = grpc.credentials.createSsl(root_certs);
412
384
});
413
385
```
414
386
415
-
####Authenticate with Google using Oauth2 token (legacy approach)
416
-
417
-
```js
418
-
var GoogleAuth =require('google-auth-library'); // from https://www.npmjs.com/package/google-auth-library
419
-
...
420
-
var ssl_creds =grpc.Credentials.createSsl(root_certs); // load_certs typically loads a CA roots file
421
-
var scope ='https://www.googleapis.com/auth/grpc-testing';
0 commit comments