google-artifactregistry-auth
Advanced tools
Comparing version 3.1.0 to 3.1.1
{ | ||
"name": "google-artifactregistry-auth", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "google-artifactregistry-auth is an npm module that allows you to configure npm to interact with npm repositories stored in Artifact Registry.", | ||
@@ -5,0 +5,0 @@ "main": "./src/main.js", |
@@ -57,12 +57,3 @@ // Copyright 2019 Google LLC | ||
const client = await auth.getClient(); | ||
const creds = (await client.getAccessToken()).token; | ||
const tokenScopes = (await client.getTokenInfo(creds)).scopes; | ||
if (!tokenScopes.includes( | ||
'https://www.googleapis.com/auth/cloud-platform')) { | ||
throw new Error( | ||
'Token has insufficient authentication scopes.\n' + | ||
'Please configure access scope following instructions on ' + | ||
'https://cloud.google.com/artifact-registry/docs/access-control#compute'); | ||
} | ||
return creds; | ||
return (await client.getAccessToken()).token; | ||
} | ||
@@ -69,0 +60,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54556
796