We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 040ca9e commit 68ebac6Copy full SHA for 68ebac6
lib/main.ts
@@ -401,7 +401,6 @@ export async function getM2MToken<T = string>(
401
throw new Error("getM2MToken: No access token returned");
402
}
403
404
- console.log("returning token: ", result.json.access_token);
405
return result.json.access_token;
406
} catch (error) {
407
throw new Error(
@@ -471,6 +470,12 @@ export async function createKindeAPI(
471
470
audience: [`${event.context.domains.kindeDomain}/api`],
472
});
473
+ if (typeof token === "object") {
474
+ token = JSON.stringify(token);
475
+ token = token.replace(`"\\"`, "");
476
+ token = token.replace(`\\""`, "");
477
+ }
478
+
479
const callKindeAPI = async ({
480
method,
481
endpoint,
0 commit comments