Skip to content

Commit

Permalink
fix(serverless): clean up ID token example (#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace Nassri committed Mar 9, 2022
1 parent 8d47644 commit db27f1b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions samples/idtokens-serverless.js
Expand Up @@ -28,19 +28,21 @@ function main(
const {URL} = require('url');
targetAudience = new URL(url).origin;
}
// [START google_auth_idtoken_serverless]
// [START cloudrun_service_to_service_auth]
// [START run_service_to_service_auth]
// [START functions_bearer_token]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
// Example: https://my-cloud-run-service.run.app/books/delete/12345
// const url = 'https://TARGET_HOSTNAME/TARGET_URL';

// [END functions_bearer_token]
// Example (Cloud Run): https://my-cloud-run-service.run.app/
// [START functions_bearer_token]
// [END cloudrun_service_to_service_auth]
// Example (Cloud Functions): https://project-region-projectid.cloudfunctions.net/myFunction
// const targetAudience = 'https://TARGET_HOSTNAME/';
// [START cloudrun_service_to_service_auth]
// const targetAudience = 'https://TARGET_AUDIENCE/';
const {GoogleAuth} = require('google-auth-library');
const auth = new GoogleAuth();

Expand All @@ -56,9 +58,7 @@ function main(
process.exitCode = 1;
});
// [END functions_bearer_token]
// [END run_service_to_service_auth]
// [END cloudrun_service_to_service_auth]
// [END google_auth_idtoken_serverless]
}

const args = process.argv.slice(2);
Expand Down

0 comments on commit db27f1b

Please sign in to comment.