From 1e0dd8feeabe72ec6c031ccad0016310a06dfcff Mon Sep 17 00:00:00 2001 From: Aswin V Date: Tue, 1 Mar 2022 00:44:19 +0530 Subject: [PATCH] Remove await --- pages/api/saml/auth.ts | 4 ++-- pages/api/saml/metadata/download.ts | 2 +- pages/index.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/api/saml/auth.ts b/pages/api/saml/auth.ts index 903cb9c..1b6d80b 100644 --- a/pages/api/saml/auth.ts +++ b/pages/api/saml/auth.ts @@ -34,8 +34,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) user: user, }); - const signingKey = await fetchPrivateKey(); - const publicKey = await fetchPublicKey(); + const signingKey = fetchPrivateKey(); + const publicKey = fetchPublicKey(); const xmlSigned = await signResponseXML(xml, signingKey, publicKey); const encodedSamlResponse = Buffer.from(xmlSigned).toString('base64'); diff --git a/pages/api/saml/metadata/download.ts b/pages/api/saml/metadata/download.ts index 2781017..25e38a7 100644 --- a/pages/api/saml/metadata/download.ts +++ b/pages/api/saml/metadata/download.ts @@ -20,7 +20,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse< const xml = await createIdPMetadataXML({ idpEntityId: config.entityId, idpSsoUrl: config.ssoUrl, - certificate: await fetchPublicKey(), + certificate: fetchPublicKey(), }); res.setHeader('Content-type', 'text/xml'); diff --git a/pages/index.tsx b/pages/index.tsx index c3dfdfb..0e816f8 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -9,7 +9,7 @@ export const getStaticProps: GetStaticProps = async () => { const metadata: IdPMetadata = { ssoUrl: config.ssoUrl, entityId: config.entityId, - certificate: await fetchPublicKey(), + certificate: fetchPublicKey(), }; return {