From 7fcde89427d9bc4f6f161419c55d139bd852c9fa Mon Sep 17 00:00:00 2001 From: Alec Lomas Date: Tue, 15 Feb 2022 22:05:30 -0800 Subject: [PATCH 1/2] :alien: update withings token code --- update-withings-token.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update-withings-token.js b/update-withings-token.js index 3846384..5cd0a5d 100644 --- a/update-withings-token.js +++ b/update-withings-token.js @@ -61,10 +61,11 @@ const setWithings = (config) => { const getNewToken = async () => { const { refresh_token } = await getWithings() - const uri = 'https://account.withings.com/oauth2/token' + const uri = 'https://wbsapi.withings.net/v2/oauth2' const params = new URLSearchParams() + params.append('action', 'requesttoken') params.append('grant_type', 'refresh_token') params.append('client_id', process.env.WITHINGS_CLIENT_ID) params.append('client_secret', process.env.WITHINGS_CLIENT_SECRET) -- 2.51.2 From 0a863d2239d99879314c60e7c1d49d599bae1667 Mon Sep 17 00:00:00 2001 From: Alec Lomas Date: Tue, 15 Feb 2022 22:14:08 -0800 Subject: [PATCH 2/2] :fire: remove env key from vercel config they're all in the UI now --- vercel.json | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/vercel.json b/vercel.json index 4c151d1..0db9fc2 100644 --- a/vercel.json +++ b/vercel.json @@ -21,20 +21,5 @@ "headers": { "Cache-Control": "s-maxage=86400" }, "dest": "/public/$1" } - ], - "env": { - "NODE_ENV": "production", - "AWS_ACCESS": "@aws_access", - "AWS_SECRET": "@aws_secret", - "AWS_BUCKET": "@aws_bucket", - "FOURSQUARE_KEY": "@foursquare_key", - "GITHUB_KEY": "@github_key", - "GOODREADS_KEY": "@goodreads_key", - "GOODREADS_ID": "@goodreads_id", - "LASTFM_KEY": "@lastfm_key", - "LASTFM_USERNAME": "@lastfm_username", - "TWITTER_KEY": "@twitter_key", - "WITHINGS_CLIENT_ID": "@withings_client_id", - "WITHINGS_CLIENT_SECRET": "@withings_client_secret" - } + ] } -- 2.51.2