@ttoss/cloud-auth 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -352,6 +352,20 @@ var createAuthTemplate = ({
352
352
  LambdaConfig
353
353
  };
354
354
  }
355
+ for (const [key, lambdaTrigger] of Object.entries(LambdaConfig)) {
356
+ const permissionLogicalId = `${key}PermissionFor${CognitoUserPoolLogicalId}`.slice(0, 255);
357
+ template.Resources[permissionLogicalId] = {
358
+ Type: "AWS::Lambda::Permission",
359
+ Properties: {
360
+ Action: "lambda:InvokeFunction",
361
+ FunctionName: lambdaTrigger,
362
+ Principal: "cognito-idp.amazonaws.com",
363
+ SourceArn: {
364
+ "Fn::GetAtt": [CognitoUserPoolLogicalId, "Arn"]
365
+ }
366
+ }
367
+ };
368
+ }
355
369
  }
356
370
  return template;
357
371
  };
package/dist/index.js CHANGED
@@ -384,6 +384,20 @@ var createAuthTemplate = ({
384
384
  LambdaConfig
385
385
  };
386
386
  }
387
+ for (const [key, lambdaTrigger] of Object.entries(LambdaConfig)) {
388
+ const permissionLogicalId = `${key}PermissionFor${CognitoUserPoolLogicalId}`.slice(0, 255);
389
+ template.Resources[permissionLogicalId] = {
390
+ Type: "AWS::Lambda::Permission",
391
+ Properties: {
392
+ Action: "lambda:InvokeFunction",
393
+ FunctionName: lambdaTrigger,
394
+ Principal: "cognito-idp.amazonaws.com",
395
+ SourceArn: {
396
+ "Fn::GetAtt": [CognitoUserPoolLogicalId, "Arn"]
397
+ }
398
+ }
399
+ };
400
+ }
387
401
  }
388
402
  return template;
389
403
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/cloud-auth",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",