From cc98909b114cb2ce008b9ebe495b61c811798c3a Mon Sep 17 00:00:00 2001 From: Navdeep Gupta Date: Mon, 8 Jan 2024 16:06:33 -0500 Subject: [PATCH] fix: get key function. Signed-off-by: Navdeep Gupta --- plugins/auth-backend-module-aws-alb-provider/src/helpers.ts | 2 +- plugins/auth-backend-module-aws-alb-provider/src/module.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts index cdc19174ea..f19cfad353 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts @@ -82,7 +82,7 @@ export const provisionKeyCache = (region: string, keyCache: NodeCache) => { )}.amazonaws.com/${encodeURIComponent(header.kid)}`, ).then(response => response.text()); const keyValue = crypto.createPublicKey(keyText); - keyCache.set(header.kid, keyValue.export()); + keyCache.set(header.kid, keyValue.export({ format: 'pem', type: 'spki' })); return keyValue; }; }; diff --git a/plugins/auth-backend-module-aws-alb-provider/src/module.ts b/plugins/auth-backend-module-aws-alb-provider/src/module.ts index 14e35252af..65289bce10 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/module.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/module.ts @@ -33,7 +33,7 @@ export const authModuleAwsAlbProvider = createBackendModule({ }, async init({ providers }) { providers.registerProvider({ - providerId: 'awsAlb', + providerId: 'awsalb', factory: createProxyAuthProviderFactory({ authenticator: awsAlbAuthenticator, signInResolverFactories: {