@ttoss/react-auth 1.2.7 → 1.2.8

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
@@ -216,9 +216,10 @@ var createAuthTemplate = ({
216
216
  autoVerifiedAttributes = ["email"],
217
217
  identityPool = true,
218
218
  roles,
219
- schema
219
+ schema,
220
+ usernameAttributes = ["email"]
220
221
  } = {}) => {
221
- const AutoVerifiedAttributes = Array.isArray(autoVerifiedAttributes) && autoVerifiedAttributes.length > 0 ? autoVerifiedAttributes : void 0;
222
+ const AutoVerifiedAttributes = Array.isArray(autoVerifiedAttributes) && autoVerifiedAttributes.length > 0 ? autoVerifiedAttributes : [];
222
223
  const template = {
223
224
  AWSTemplateFormatVersion: "2010-09-09",
224
225
  Resources: {
@@ -237,7 +238,7 @@ var createAuthTemplate = ({
237
238
  }
238
239
  },
239
240
  Schema: schema,
240
- UsernameAttributes: ["email"],
241
+ UsernameAttributes: usernameAttributes,
241
242
  UsernameConfiguration: {
242
243
  CaseSensitive: false
243
244
  },
package/dist/index.js CHANGED
@@ -249,9 +249,10 @@ var createAuthTemplate = ({
249
249
  autoVerifiedAttributes = ["email"],
250
250
  identityPool = true,
251
251
  roles,
252
- schema
252
+ schema,
253
+ usernameAttributes = ["email"]
253
254
  } = {}) => {
254
- const AutoVerifiedAttributes = Array.isArray(autoVerifiedAttributes) && autoVerifiedAttributes.length > 0 ? autoVerifiedAttributes : void 0;
255
+ const AutoVerifiedAttributes = Array.isArray(autoVerifiedAttributes) && autoVerifiedAttributes.length > 0 ? autoVerifiedAttributes : [];
255
256
  const template = {
256
257
  AWSTemplateFormatVersion: "2010-09-09",
257
258
  Resources: {
@@ -270,7 +271,7 @@ var createAuthTemplate = ({
270
271
  }
271
272
  },
272
273
  Schema: schema,
273
- UsernameAttributes: ["email"],
274
+ UsernameAttributes: usernameAttributes,
274
275
  UsernameConfiguration: {
275
276
  CaseSensitive: false
276
277
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/react-auth",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "ttoss authentication module for React apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -34,7 +34,7 @@
34
34
  "react": ">=16.8.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@ttoss/cloud-auth": "^0.4.0",
37
+ "@ttoss/cloud-auth": "^0.5.0",
38
38
  "@ttoss/config": "^1.27.0",
39
39
  "@ttoss/i18n-cli": "^0.3.1",
40
40
  "@ttoss/react-i18n": "^1.18.4",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "0067587c116050873db5c57eb124fe38ec0bc9d2"
53
+ "gitHead": "6c5898425e2847fed46511ae1e573ff8dc3eb1d4"
54
54
  }