-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: Added support for Email OTP MFA
- Loading branch information
1 parent
df38424
commit 0055e53
Showing
265 changed files
with
5,359 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# amplify | ||
node_modules | ||
.amplify | ||
amplify_outputs* | ||
amplifyconfiguration* |
18 changes: 18 additions & 0 deletions
18
infra-gen2/backends/auth/mfa-optional-email-sms/amplify/auth/resource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineAuth } from "@aws-amplify/backend"; | ||
|
||
export const auth = defineAuth({ | ||
name: "mfa-optional-email-sms", | ||
loginWith: { | ||
email: true, | ||
}, | ||
|
||
// TODO(khatruong2009): Uncomment the following line when the feature is ready. | ||
// multifactor: { | ||
// mode: "OPTIONAL", | ||
// email: true, | ||
// sms: true, | ||
// }, | ||
}); |
25 changes: 25 additions & 0 deletions
25
infra-gen2/backends/auth/mfa-optional-email-sms/amplify/backend.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineBackend } from "@aws-amplify/backend"; | ||
import { addAuthUserExtensions } from "infra-common"; | ||
import { auth } from "./auth/resource"; | ||
|
||
const backend = defineBackend({ | ||
auth, | ||
}); | ||
|
||
const resources = backend.auth.resources; | ||
const { userPool, cfnResources } = resources; | ||
const { stack } = userPool; | ||
const { cfnUserPool } = cfnResources; | ||
|
||
// Adds infra for creating/deleting users via App Sync and fetching confirmation | ||
// and MFA codes from App Sync. | ||
const customOutputs = addAuthUserExtensions({ | ||
name: "mfa-optional-email-sms", | ||
stack, | ||
userPool, | ||
cfnUserPool, | ||
}); | ||
backend.addOutput(customOutputs); |
3 changes: 3 additions & 0 deletions
3
infra-gen2/backends/auth/mfa-optional-email-sms/amplify/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
17 changes: 17 additions & 0 deletions
17
infra-gen2/backends/auth/mfa-optional-email-sms/amplify/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2022", | ||
"module": "es2022", | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"paths": { | ||
"$amplify/*": [ | ||
"../.amplify/generated/*" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "mfa-optional-email-sms", | ||
"version": "1.0.0", | ||
"main": "index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# amplify | ||
node_modules | ||
.amplify | ||
amplify_outputs* | ||
amplifyconfiguration* |
18 changes: 18 additions & 0 deletions
18
infra-gen2/backends/auth/mfa-optional-email-totp/amplify/auth/resource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineAuth } from "@aws-amplify/backend"; | ||
|
||
export const auth = defineAuth({ | ||
name: "mfa-optional-email-totp", | ||
loginWith: { | ||
email: true, | ||
}, | ||
|
||
// TODO(khatruong2009): Uncomment the following line when the feature is ready. | ||
// multifactor: { | ||
// mode: "OPTIONAL", | ||
// email: true, | ||
// totp: true, | ||
// }, | ||
}); |
25 changes: 25 additions & 0 deletions
25
infra-gen2/backends/auth/mfa-optional-email-totp/amplify/backend.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineBackend } from "@aws-amplify/backend"; | ||
import { addAuthUserExtensions } from "infra-common"; | ||
import { auth } from "./auth/resource"; | ||
|
||
const backend = defineBackend({ | ||
auth, | ||
}); | ||
|
||
const resources = backend.auth.resources; | ||
const { userPool, cfnResources } = resources; | ||
const { stack } = userPool; | ||
const { cfnUserPool } = cfnResources; | ||
|
||
// Adds infra for creating/deleting users via App Sync and fetching confirmation | ||
// and MFA codes from App Sync. | ||
const customOutputs = addAuthUserExtensions({ | ||
name: "mfa-optional-email-totp", | ||
stack, | ||
userPool, | ||
cfnUserPool, | ||
}); | ||
backend.addOutput(customOutputs); |
3 changes: 3 additions & 0 deletions
3
infra-gen2/backends/auth/mfa-optional-email-totp/amplify/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
17 changes: 17 additions & 0 deletions
17
infra-gen2/backends/auth/mfa-optional-email-totp/amplify/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2022", | ||
"module": "es2022", | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"paths": { | ||
"$amplify/*": [ | ||
"../.amplify/generated/*" | ||
] | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
infra-gen2/backends/auth/mfa-optional-email-totp/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "mfa-optional-email-totp", | ||
"version": "1.0.0", | ||
"main": "index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# amplify | ||
node_modules | ||
.amplify | ||
amplify_outputs* | ||
amplifyconfiguration* |
17 changes: 17 additions & 0 deletions
17
infra-gen2/backends/auth/mfa-optional-email/amplify/auth/resource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineAuth } from "@aws-amplify/backend"; | ||
|
||
export const auth = defineAuth({ | ||
name: "mfa-optional-email", | ||
loginWith: { | ||
email: true, | ||
}, | ||
|
||
// TODO(khatruong2009): Uncomment the following line when the feature is ready. | ||
// multifactor: { | ||
// mode: "OPTIONAL", | ||
// email: true, | ||
// }, | ||
}); |
25 changes: 25 additions & 0 deletions
25
infra-gen2/backends/auth/mfa-optional-email/amplify/backend.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineBackend } from "@aws-amplify/backend"; | ||
import { addAuthUserExtensions } from "infra-common"; | ||
import { auth } from "./auth/resource"; | ||
|
||
const backend = defineBackend({ | ||
auth, | ||
}); | ||
|
||
const resources = backend.auth.resources; | ||
const { userPool, cfnResources } = resources; | ||
const { stack } = userPool; | ||
const { cfnUserPool } = cfnResources; | ||
|
||
// Adds infra for creating/deleting users via App Sync and fetching confirmation | ||
// and MFA codes from App Sync. | ||
const customOutputs = addAuthUserExtensions({ | ||
name: "mfa-optional-email", | ||
stack, | ||
userPool, | ||
cfnUserPool, | ||
}); | ||
backend.addOutput(customOutputs); |
3 changes: 3 additions & 0 deletions
3
infra-gen2/backends/auth/mfa-optional-email/amplify/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
17 changes: 17 additions & 0 deletions
17
infra-gen2/backends/auth/mfa-optional-email/amplify/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2022", | ||
"module": "es2022", | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"paths": { | ||
"$amplify/*": [ | ||
"../.amplify/generated/*" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "mfa-optional-email", | ||
"version": "1.0.0", | ||
"main": "index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# amplify | ||
node_modules | ||
.amplify | ||
amplify_outputs* | ||
amplifyconfiguration* |
17 changes: 17 additions & 0 deletions
17
infra-gen2/backends/auth/mfa-required-email-sms/amplify/auth/resource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineAuth } from "@aws-amplify/backend"; | ||
|
||
export const auth = defineAuth({ | ||
name: "mfa-required-email-sms", | ||
loginWith: { | ||
email: true, | ||
}, | ||
// TODO(khatruong2009): Uncomment the following line when the feature is ready. | ||
// multifactor: { | ||
// mode: "REQUIRED", | ||
// email: true, | ||
// sms: true, | ||
// }, | ||
}); |
25 changes: 25 additions & 0 deletions
25
infra-gen2/backends/auth/mfa-required-email-sms/amplify/backend.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineBackend } from "@aws-amplify/backend"; | ||
import { addAuthUserExtensions } from "infra-common"; | ||
import { auth } from "./auth/resource"; | ||
|
||
const backend = defineBackend({ | ||
auth, | ||
}); | ||
|
||
const resources = backend.auth.resources; | ||
const { userPool, cfnResources } = resources; | ||
const { stack } = userPool; | ||
const { cfnUserPool } = cfnResources; | ||
|
||
// Adds infra for creating/deleting users via App Sync and fetching confirmation | ||
// and MFA codes from App Sync. | ||
const customOutputs = addAuthUserExtensions({ | ||
name: "mfa-required-email-sms", | ||
stack, | ||
userPool, | ||
cfnUserPool, | ||
}); | ||
backend.addOutput(customOutputs); |
3 changes: 3 additions & 0 deletions
3
infra-gen2/backends/auth/mfa-required-email-sms/amplify/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
17 changes: 17 additions & 0 deletions
17
infra-gen2/backends/auth/mfa-required-email-sms/amplify/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2022", | ||
"module": "es2022", | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"paths": { | ||
"$amplify/*": [ | ||
"../.amplify/generated/*" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "mfa-required-email-sms", | ||
"version": "1.0.0", | ||
"main": "index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# amplify | ||
node_modules | ||
.amplify | ||
amplify_outputs* | ||
amplifyconfiguration* |
17 changes: 17 additions & 0 deletions
17
infra-gen2/backends/auth/mfa-required-email-totp/amplify/auth/resource.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineAuth } from "@aws-amplify/backend"; | ||
|
||
export const auth = defineAuth({ | ||
name: "mfa-required-email-totp", | ||
loginWith: { | ||
email: true, | ||
}, | ||
// TODO(khatruong2009): Uncomment the following line when the feature is ready. | ||
// multifactor: { | ||
// mode: "REQUIRED", | ||
// email: true, | ||
// totp: true, | ||
// }, | ||
}); |
25 changes: 25 additions & 0 deletions
25
infra-gen2/backends/auth/mfa-required-email-totp/amplify/backend.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { defineBackend } from "@aws-amplify/backend"; | ||
import { addAuthUserExtensions } from "infra-common"; | ||
import { auth } from "./auth/resource"; | ||
|
||
const backend = defineBackend({ | ||
auth, | ||
}); | ||
|
||
const resources = backend.auth.resources; | ||
const { userPool, cfnResources } = resources; | ||
const { stack } = userPool; | ||
const { cfnUserPool } = cfnResources; | ||
|
||
// Adds infra for creating/deleting users via App Sync and fetching confirmation | ||
// and MFA codes from App Sync. | ||
const customOutputs = addAuthUserExtensions({ | ||
name: "mfa-required-email-totp", | ||
stack, | ||
userPool, | ||
cfnUserPool, | ||
}); | ||
backend.addOutput(customOutputs); |
3 changes: 3 additions & 0 deletions
3
infra-gen2/backends/auth/mfa-required-email-totp/amplify/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
Oops, something went wrong.