From 67d5a35e415f7487383a5bd92dd23d7a23fa483b Mon Sep 17 00:00:00 2001 From: Wade Wegner Date: Sun, 3 May 2020 16:02:16 -0700 Subject: [PATCH] testing auth url --- functions/untappd_callback/untappd_callback.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/functions/untappd_callback/untappd_callback.js b/functions/untappd_callback/untappd_callback.js index 3582cd0..8045f2f 100644 --- a/functions/untappd_callback/untappd_callback.js +++ b/functions/untappd_callback/untappd_callback.js @@ -2,12 +2,21 @@ exports.handler = async (event, context) => { try { const code = event.queryStringParameters.code || 'World' + const client_id = process.env.UNTAPPD_CLIENT_ID + const client_secret = process.env.UNTAPPD_CLIENT_SECRET + const redirect_url = process.env.UNTAPPD_REDIRECT_URL + const auth_url = `https://untappd.com/oauth/authorize/?client_id=${client_id}&client_secret==${client_secret}&response_type=code&redirect_url=${redirect_url}&code=CODE` + return { statusCode: 200, - body: JSON.stringify({ message: `${code}` }) + body: JSON.stringify({ message: `${auth_url}` }) // // more keys you can return: // headers: { "headerName": "headerValue", ... }, // isBase64Encoded: true, + + // https://untappd.com/oauth/authorize/?client_id=CLIENTID&client_secret=CLIENTSECRET&response_type=code&redirect_url=REDIRECT_URL&code=CODE + + } } catch (err) { return { statusCode: 500, body: err.toString() }