@resistdesign/voltra 3.0.0-alpha.29 → 3.0.0-alpha.30

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.
@@ -14,14 +14,6 @@ type AddUserManagementConfigBase = {
14
14
  * IAM role name for unauthenticated users.
15
15
  */
16
16
  unauthRoleName: string;
17
- /**
18
- * OAuth callback URLs.
19
- */
20
- callbackUrls?: any[];
21
- /**
22
- * OAuth logout URLs.
23
- */
24
- logoutUrls?: any[];
25
17
  /**
26
18
  * Alias target DNS name for the base domain record.
27
19
  */
@@ -54,6 +46,14 @@ type AddUserManagementConfigWithDomain = AddUserManagementConfigBase & {
54
46
  * SSL certificate ARN for the user pool domain.
55
47
  */
56
48
  sslCertificateArn: any;
49
+ /**
50
+ * OAuth callback URLs.
51
+ */
52
+ callbackUrls?: any[];
53
+ /**
54
+ * OAuth logout URLs.
55
+ */
56
+ logoutUrls?: any[];
57
57
  };
58
58
  type AddUserManagementConfigWithoutDomain = AddUserManagementConfigBase & {
59
59
  /**
@@ -64,6 +64,8 @@ type AddUserManagementConfigWithoutDomain = AddUserManagementConfigBase & {
64
64
  hostedZoneId?: never;
65
65
  sslCertificateArn?: never;
66
66
  baseDomainRecordAliasTargetDNSName?: never;
67
+ callbackUrls?: never;
68
+ logoutUrls?: never;
67
69
  };
68
70
  /**
69
71
  * Configuration for {@link addUserManagement}.
@@ -30,14 +30,6 @@ type AddAuthConfigBase = {
30
30
  * Cognito group name for admins.
31
31
  */
32
32
  userManagementAdminGroupName: string;
33
- /**
34
- * OAuth callback URLs.
35
- */
36
- callbackUrls: any[];
37
- /**
38
- * OAuth logout URLs.
39
- */
40
- logoutUrls: any[];
41
33
  };
42
34
  type AddAuthConfigWithUserPoolDomain = AddAuthConfigBase & {
43
35
  /**
@@ -62,6 +54,14 @@ type AddAuthConfigWithUserPoolDomain = AddAuthConfigBase & {
62
54
  * CloudFront distribution id for the main CDN.
63
55
  */
64
56
  mainCDNCloudFrontId: string;
57
+ /**
58
+ * OAuth callback URLs.
59
+ */
60
+ callbackUrls: any[];
61
+ /**
62
+ * OAuth logout URLs.
63
+ */
64
+ logoutUrls: any[];
65
65
  };
66
66
  type AddAuthConfigWithoutUserPoolDomain = AddAuthConfigBase & {
67
67
  /**
@@ -72,6 +72,8 @@ type AddAuthConfigWithoutUserPoolDomain = AddAuthConfigBase & {
72
72
  domainNameParameterName?: never;
73
73
  sslCertificateId?: never;
74
74
  mainCDNCloudFrontId?: never;
75
+ callbackUrls?: never;
76
+ logoutUrls?: never;
75
77
  };
76
78
  /**
77
79
  * Configuration for {@link addAuth}.
@@ -276,11 +276,11 @@ var addUserManagement = createResourcePack(
276
276
  "profile",
277
277
  "aws.cognito.signin.user.admin"
278
278
  ],
279
- CallbackURLs: callbackUrls,
280
- LogoutURLs: logoutUrls,
281
279
  EnableTokenRevocation: true,
282
280
  PreventUserExistenceErrors: "ENABLED",
283
- SupportedIdentityProviders: ["COGNITO"]
281
+ SupportedIdentityProviders: ["COGNITO"],
282
+ ...callbackUrls && callbackUrls.length > 0 ? { CallbackURLs: callbackUrls } : {},
283
+ ...logoutUrls && logoutUrls.length > 0 ? { LogoutURLs: logoutUrls } : {}
284
284
  }
285
285
  },
286
286
  [`${id}IdentityPool`]: {
@@ -327,8 +327,6 @@ var addAuth = createResourcePack((config) => {
327
327
  id: userManagementId,
328
328
  authRoleName,
329
329
  unauthRoleName,
330
- callbackUrls,
331
- logoutUrls,
332
330
  apiGatewayRESTAPIId: {
333
331
  Ref: apiCloudFunctionGatewayId
334
332
  },
@@ -348,7 +346,9 @@ var addAuth = createResourcePack((config) => {
348
346
  },
349
347
  baseDomainRecordAliasTargetDNSName: {
350
348
  "Fn::GetAtt": [config.mainCDNCloudFrontId, "DomainName"]
351
- }
349
+ },
350
+ callbackUrls,
351
+ logoutUrls
352
352
  }
353
353
  }).patch({
354
354
  Resources: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resistdesign/voltra",
3
- "version": "3.0.0-alpha.29",
3
+ "version": "3.0.0-alpha.30",
4
4
  "description": "With our powers combined!",
5
5
  "homepage": "https://voltra.app",
6
6
  "repository": "git@github.com:resistdesign/voltra.git",