Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
gcseh committed Sep 17, 2021
1 parent b34de54 commit fc6f2d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions samples/access_token_example/access_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ const publishPubSubMessage = async (
// algorithm = 'RS256'
// privateKeyFile = 'path/to/private_key.pem'
// topicId = 'pubsub-topic-id'

const scope = 'https://www.googleapis.com/auth/pubsub';

// Generate device access token
const access_token = await generateAccessToken(
cloudRegion,
Expand Down Expand Up @@ -181,6 +181,7 @@ const downloadCloudStorageFile = async (
// bucketName = 'name-of-gcs-bucket'
// dataPath = 'path/to/file/to/be/uploaded.png'
const scope = 'https://www.googleapis.com/auth/devstorage.full_control';

// Generate device access token
const access_token = await generateAccessToken(
cloudRegion,
Expand All @@ -203,7 +204,6 @@ const downloadCloudStorageFile = async (
uniformBucketLevelAccess: {enabled: true},
},
};

const createGcsRequestUrl = `https://storage.googleapis.com/storage/v1/b?project=${projectId}`;
const createGcsOptions = {
url: createGcsRequestUrl,
Expand Down Expand Up @@ -339,8 +339,8 @@ const sendCommandToIoTDevice = async (
// privateKeyFile = 'path/to/private_key.pem'
// serviceAccountEmail = 'your-service-account@your-project.iam.gserviceaccount.com'
// commandTobeSentToDevice = 'command-to-device'

const scope = 'https://www.googleapis.com/auth/cloud-platform';

// Generate device access token
const access_token = await generateAccessToken(
cloudRegion,
Expand Down

0 comments on commit fc6f2d5

Please sign in to comment.