Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(serverless): clean up ID token example #1380

Merged
merged 1 commit into from Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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