cloudflare-workers-and-google-oauth
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -28,2 +28,4 @@ "use strict"; | ||
const scope = this.formatScopes(this.scopes); | ||
console.log(scope); | ||
console.log(user, key); | ||
const jwtHeader = this.objectToBase64url({ alg: 'RS256', typ: 'JWT' }); | ||
@@ -43,3 +45,3 @@ try { | ||
const body = `grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=${signedJwt}`; | ||
const response = yield fetch('https://oauth2.googleapis.com/token', { | ||
const response = yield fetch(this.googleKey.token_uri, { | ||
method: 'POST', | ||
@@ -54,2 +56,3 @@ headers: { | ||
const { access_token } = yield response.json(); | ||
console.log(access_token); | ||
return access_token; | ||
@@ -59,2 +62,3 @@ } | ||
console.error(err); | ||
console.log("Error"); | ||
return undefined; | ||
@@ -61,0 +65,0 @@ } |
{ | ||
"name": "cloudflare-workers-and-google-oauth", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Enables easier interfacing with GCS OAuth API for use in Cloudflare Workers", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
6619
125