fix: incorrect client_id parameter assignment in generating access token for webex (#11472)

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
pull/9754/head^2
Aldrin 2023-09-23 04:55:00 +05:30 committed by GitHub
parent 5940f9bccd
commit 798707a553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -17,14 +17,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const redirectUri = encodeURI(`${WEBAPP_URL}/api/integrations/${config.slug}/callback`);
const authHeader = "Basic " + Buffer.from(client_id + ":" + client_secret).toString("base64");
const result = await fetch(
"https://webexapis.com/v1/access_token?grant_type=authorization_code&client_id" +
client_id +
"&client_secret=" +
client_secret +
"&code=" +
code +
"&redirect_uri=" +
redirectUri,
`https://webexapis.com/v1/access_token?grant_type=authorization_code&client_id=${client_id}&client_secret=${client_secret}&code=${code}&redirect_uri=${redirectUri}`,
{
method: "POST",
headers: {