From 476e7b2755f52b533df8967104c53244660cd45f Mon Sep 17 00:00:00 2001 From: tate Date: Sun, 10 Jan 2021 17:13:05 -0500 Subject: [PATCH] fix: JWK checking --- index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/index.ts b/index.ts index 26aaf40..040016b 100644 --- a/index.ts +++ b/index.ts @@ -33,11 +33,7 @@ try { }; } -const jwk = JSON.parse( - fs.readFileSync(config.keyfile, { - encoding: "utf-8", - }) -); +const jwk = typeof config.keyfile === "string" ? JSON.parse(config.keyfile) : config.keyfile ; const oauthClient = new google.auth.OAuth2( config["googleClientID"],