Skip to content

Commit ca1e497

Browse files
EquarteyDillon Nys
authored andcommitted
feat(authenticator): TOTP MFA (#3609)
Adds TOTP MFA feature to The Authenticator package.
1 parent 40be7cb commit ca1e497

File tree

78 files changed

+1713
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1713
-32
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Thank you for your interest in contributing to our project! <3 Whether it's a bu
2020
- [Unit Tests](#unit-tests)
2121
- [Integration Tests](#integration-tests)
2222
- [Provision Resources For Integration Tests](#provision-resources-for-integration-tests)
23+
- [Screenshot Tests](#screenshot-tests)
2324
- [Code of Conduct](#code-of-conduct)
2425
- [Security issue notifications](#security-issue-notifications)
2526
- [Licensing](#licensing)
@@ -248,6 +249,17 @@ $ tool/provision_integration_test_resources.sh
248249

249250
This script can be re-run anytime the environments need to be updated. Further information can be found in the [infra](infra/README.md) package.
250251

252+
## Screenshot Tests
253+
254+
The Amplify Authenticator package contains a screenshot test suite called `goldens`. If your changes include UI changes within this package please regenerate the goldens.
255+
256+
To regenerate, navigate to the root of the Authenticator package and run:
257+
258+
```bash
259+
$ cd packages/authenticator/amplify_authenticator
260+
$ flutter test --update-goldens
261+
```
262+
251263
## Code of Conduct
252264

253265
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).

packages/api/amplify_api/example/linux/flutter/generated_plugin_registrant.cc

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api/amplify_api/example/linux/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api/amplify_api/example/macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api/amplify_api/example/windows/flutter/generated_plugin_registrant.cc

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api/amplify_api/example/windows/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/auth/amplify_auth_cognito/example/integration_test/mfa_sms_totp_optional_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:checks/checks.dart';
88
import 'package:flutter_test/flutter_test.dart';
99

1010
import 'test_runner.dart';
11-
import 'utils/totp_utils.dart';
1211

1312
void main() {
1413
testRunner.setupTests();

packages/auth/amplify_auth_cognito/example/integration_test/mfa_sms_totp_required_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'package:checks/checks.dart';
99
import 'package:flutter_test/flutter_test.dart';
1010

1111
import 'test_runner.dart';
12-
import 'utils/totp_utils.dart';
1312

1413
void main() {
1514
testRunner.setupTests();

packages/auth/amplify_auth_cognito/example/integration_test/mfa_totp_optional_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:checks/checks.dart';
88
import 'package:flutter_test/flutter_test.dart';
99

1010
import 'test_runner.dart';
11-
import 'utils/totp_utils.dart';
1211

1312
void main() {
1413
testRunner.setupTests();

packages/auth/amplify_auth_cognito/example/integration_test/mfa_totp_required_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'package:checks/checks.dart';
99
import 'package:flutter_test/flutter_test.dart';
1010

1111
import 'test_runner.dart';
12-
import 'utils/totp_utils.dart';
1312

1413
void main() {
1514
testRunner.setupTests();

packages/auth/amplify_auth_cognito/example/linux/flutter/generated_plugin_registrant.cc

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/auth/amplify_auth_cognito/example/linux/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/auth/amplify_auth_cognito/example/macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/auth/amplify_auth_cognito/example/windows/flutter/generated_plugin_registrant.cc

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/auth/amplify_auth_cognito/example/windows/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/authenticator/amplify_authenticator/example/integration_test/main_test.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import 'http_test.dart' as http_tests;
1313
import 'reset_password_test.dart' as reset_password_tests;
1414
import 'sign_in_force_new_password_test.dart'
1515
as sign_in_force_new_password_tests;
16-
import 'sign_in_mfa_test.dart' as sign_in_mfa_tests;
16+
import 'sign_in_mfa_sms_test.dart' as sign_in_mfa_sms_tests;
17+
import 'sign_in_mfa_sms_totp_test.dart' as sign_in_mfa_sms_totp_tests;
18+
import 'sign_in_mfa_totp_test.dart' as sign_in_mfa_totp_tests;
1719
import 'sign_in_with_email_test.dart' as sign_in_with_email_tests;
1820
import 'sign_in_with_phone_test.dart' as sign_in_with_phone_tests;
1921
import 'sign_in_with_username_test.dart' as sign_in_with_username_tests;
@@ -37,7 +39,9 @@ void main() {
3739
http_tests.main();
3840
reset_password_tests.main();
3941
sign_in_force_new_password_tests.main();
40-
sign_in_mfa_tests.main();
42+
sign_in_mfa_sms_tests.main();
43+
sign_in_mfa_sms_totp_tests.main();
44+
sign_in_mfa_totp_tests.main();
4145
sign_in_with_email_tests.main();
4246
sign_in_with_phone_tests.main();
4347
sign_in_with_username_tests.main();

0 commit comments

Comments
 (0)