├── testing ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── amplifyframework │ │ └── ui │ │ └── testing │ │ ├── CoroutineTestRule.kt │ │ ├── ComposeRobot.kt │ │ └── ComposeTest.kt └── build.gradle.kts ├── authenticator ├── .gitignore ├── consumer-rules.pro ├── src │ ├── test │ │ ├── screenshots │ │ │ ├── SignInTest_default-state.png │ │ │ ├── SignUpTest_default-state.png │ │ │ ├── SignUpTest_invalid-email.png │ │ │ ├── SignInTest_password-visible.png │ │ │ ├── SignInTest_ready-to-submit.png │ │ │ ├── SignUpTest_invalid-password.png │ │ │ ├── SignUpTest_password-visible.png │ │ │ ├── SignUpTest_ready-to-submit.png │ │ │ ├── SignUpTest_username-exists.png │ │ │ ├── SignInTest_username-not-found.png │ │ │ ├── PasskeyCreatedTest_done-selected.png │ │ │ ├── PasswordResetTest_default-state.png │ │ │ ├── SignInConfirmMfaTest_default-state.png │ │ │ ├── SignUpTest_passwordless-with-email.png │ │ │ ├── SignUpTest_passwords-do-not-match.png │ │ │ ├── PasskeyCreatedTest_with-one-passkey.png │ │ │ ├── PasswordResetTest_username-not-found.png │ │ │ ├── SignInConfirmMfaTest_incorrect-code.png │ │ │ ├── SignUpTest_passwordless-with-username.png │ │ │ ├── PasskeyCreationPromptTest_default-state.png │ │ │ ├── PasswordResetConfirmTest_default-state.png │ │ │ ├── SignInConfirmPasswordTest_default-state.png │ │ │ ├── SignInConfirmTotpCodeTest_default-state.png │ │ │ ├── SignInConfirmTotpCodeTest_invalid-code.png │ │ │ ├── SignInSelectAuthFactorTest_no-password.png │ │ │ ├── PasskeyCreatedTest_with-multiple-passkeys.png │ │ │ ├── PasskeyCreationPromptTest_creating-passkey.png │ │ │ ├── SignInConfirmPasswordTest_password-visible.png │ │ │ ├── SignInConfirmPasswordTest_ready-to-submit.png │ │ │ ├── PasswordResetConfirmTest_passwords-do-not-match.png │ │ │ ├── SignInContinueWithEmailSetupTest_default-state.png │ │ │ ├── SignInContinueWithTotpSetupTest_default-state.png │ │ │ ├── SignInContinueWithMfaSelectionTest_default-state.png │ │ │ ├── PasskeyCreationPromptTest_skipping-passkey-creation.png │ │ │ ├── PasswordResetConfirmTest_incorrect-confirmation-code.png │ │ │ ├── SignInConfirmPasswordTest_ready-to-submit-with-email.png │ │ │ ├── SignInSelectAuthFactorTest_default-state-with-all-factors.png │ │ │ ├── SignInConfirmPasswordTest_ready-to-submit-with-phonenumber.png │ │ │ ├── SignInSelectAuthFactorTest_default-state-with-all-factors-with-email.png │ │ │ └── SignInSelectAuthFactorTest_default-state-with-all-factors-with-phone-number.png │ │ └── java │ │ │ └── com │ │ │ └── amplifyframework │ │ │ └── ui │ │ │ └── authenticator │ │ │ ├── ui │ │ │ ├── robots │ │ │ │ ├── PasskeyCreatedRobot.kt │ │ │ │ ├── PasskeyCreationPromptRobot.kt │ │ │ │ ├── SignInConfirmMfaRobot.kt │ │ │ │ ├── PasswordResetConfirmRobot.kt │ │ │ │ ├── PasswordResetRobot.kt │ │ │ │ ├── SignInConfirmTotpCodeRobot.kt │ │ │ │ ├── SignInContinueWithEmailSetupRobot.kt │ │ │ │ ├── SignInContinueWithTotpSetupRobot.kt │ │ │ │ ├── SignInRobot.kt │ │ │ │ ├── SignInContinueWithMfaSelectionRobot.kt │ │ │ │ ├── SignInConfirmPasswordRobot.kt │ │ │ │ ├── SignInSelectAuthFactorRobot.kt │ │ │ │ ├── ScreenLevelRobot.kt │ │ │ │ └── SignUpRobot.kt │ │ │ ├── SignInContinueWithMfaSetupSelectionTest.kt │ │ │ └── SignInConfirmMfaTest.kt │ │ │ ├── util │ │ │ └── ExceptionsTest.kt │ │ │ └── testUtil │ │ │ └── AuthenticatorUiTest.kt │ └── main │ │ ├── java │ │ └── com │ │ │ └── amplifyframework │ │ │ └── ui │ │ │ └── authenticator │ │ │ ├── util │ │ │ ├── AuthenticatorUiConstants.kt │ │ │ ├── OsBuild.kt │ │ │ ├── ContextExtensions.kt │ │ │ ├── AmplifyResult.kt │ │ │ ├── Errors.kt │ │ │ ├── Autofill.kt │ │ │ └── PasskeyPromptCheck.kt │ │ │ ├── enums │ │ │ └── SignInSource.kt │ │ │ ├── states │ │ │ ├── MutableActionState.kt │ │ │ ├── PasskeyCreatedStateImpl.kt │ │ │ ├── SignInConfirmTotpCodeStateImpl.kt │ │ │ ├── PromptToCreatePasskeyStateImpl.kt │ │ │ ├── SignInContinueWithTotpSetupStateImpl.kt │ │ │ ├── SignedInStateImpl.kt │ │ │ ├── SignInConfirmPasswordStateImpl.kt │ │ │ ├── SignInContinueWithMfaSelectionStateImpl.kt │ │ │ ├── SignInContinueWithEmailSetupStateImpl.kt │ │ │ ├── VerifyUserStateImpl.kt │ │ │ ├── VerifyUserConfirmStateImpl.kt │ │ │ ├── PasswordResetStateImpl.kt │ │ │ ├── SignInConfirmMfaStateImpl.kt │ │ │ ├── SignInConfirmCustomStateImpl.kt │ │ │ ├── SignUpConfirmStateImpl.kt │ │ │ ├── SignInConfirmNewPasswordStateImpl.kt │ │ │ ├── SignInStateImpl.kt │ │ │ ├── SignInContinueWithMfaSetupSelectionStateImpl.kt │ │ │ ├── BaseStateImpl.kt │ │ │ └── SignInSelectAuthFactorStateImpl.kt │ │ │ ├── locals │ │ │ ├── LocalAuthenticatorStep.kt │ │ │ └── LocalStringResolver.kt │ │ │ ├── data │ │ │ ├── UserInfo.kt │ │ │ └── PasskeyPrompt.kt │ │ │ ├── options │ │ │ └── TotpOptions.kt │ │ │ ├── ui │ │ │ ├── CommonFooter.kt │ │ │ ├── AuthenticatorTitle.kt │ │ │ ├── DividerWithText.kt │ │ │ ├── AuthenticatorError.kt │ │ │ ├── DeliveryDetails.kt │ │ │ ├── QrCode.kt │ │ │ ├── AuthenticatorButton.kt │ │ │ ├── RadioGroup.kt │ │ │ └── AuthenticatorForm.kt │ │ │ └── AuthenticatorConfiguration.kt │ │ ├── res │ │ ├── drawable │ │ │ ├── ic_authenticator_clear.xml │ │ │ ├── ic_authenticator_calendar.xml │ │ │ ├── ic_authenticator_search.xml │ │ │ ├── authenticator_success.xml │ │ │ ├── ic_authenticator_visible.xml │ │ │ └── ic_authenticator_invisible.xml │ │ └── values │ │ │ ├── messages.xml │ │ │ └── errors.xml │ │ └── AndroidManifest.xml ├── build.gradle.kts └── gradle.properties ├── liveness ├── .gitignore ├── src │ ├── test │ │ └── resources │ │ │ └── robolectric.properties │ └── main │ │ ├── assets │ │ └── face_detection_short_range.tflite │ │ ├── java │ │ └── com │ │ │ └── amplifyframework │ │ │ └── ui │ │ │ └── liveness │ │ │ ├── util │ │ │ ├── WebSocketCloseCode.kt │ │ │ └── Extensions.kt │ │ │ ├── state │ │ │ └── AttemptCounter.kt │ │ │ ├── ui │ │ │ ├── LivenessPreviewContainer.kt │ │ │ ├── AlwaysOnMaxBrightnessScreen.kt │ │ │ └── LockPortraitOrientation.kt │ │ │ ├── model │ │ │ └── Freshness.kt │ │ │ └── ml │ │ │ └── FaceOval.kt │ │ ├── cpp │ │ ├── liveness_jni_hooks.cpp │ │ └── CMakeLists.txt │ │ └── AndroidManifest.xml ├── README.md ├── gradle.properties └── build.gradle.kts ├── NOTICE ├── samples ├── liveness │ ├── app │ │ ├── .gitignore │ │ ├── src │ │ │ └── main │ │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values │ │ │ │ │ └── themes.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-anydpi-v33 │ │ │ │ │ └── ic_launcher.xml │ │ │ │ └── drawable │ │ │ │ │ ├── ic_baseline_error_24.xml │ │ │ │ │ └── ic_outline_content_copy_24.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── amplifyframework │ │ │ │ │ └── ui │ │ │ │ │ └── sample │ │ │ │ │ └── liveness │ │ │ │ │ ├── ui │ │ │ │ │ └── LivenessScreen.kt │ │ │ │ │ ├── LivenessApp.kt │ │ │ │ │ └── LivenessSampleBackend.kt │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle.kts │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── build.gradle.kts │ ├── .gitignore │ ├── settings.gradle.kts │ └── gradle.properties ├── authenticator │ ├── app │ │ ├── .gitignore │ │ ├── src │ │ │ └── main │ │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.webp │ │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── themes.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ └── mipmap-anydpi-v33 │ │ │ │ │ └── ic_launcher.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── amplifyframework │ │ │ │ │ └── ui │ │ │ │ │ └── sample │ │ │ │ │ └── authenticator │ │ │ │ │ ├── theme │ │ │ │ │ └── default │ │ │ │ │ │ ├── Color.kt │ │ │ │ │ │ └── Type.kt │ │ │ │ │ ├── AuthenticatorSampleApp.kt │ │ │ │ │ └── data │ │ │ │ │ └── ThemeDatastore.kt │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle.kts │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── build.gradle.kts │ ├── settings.gradle.kts │ ├── .gitignore │ └── gradle.properties └── backend-lambda-functions │ ├── createSession │ ├── package.json │ └── index.js │ └── getResults │ ├── package.json │ └── index.js ├── configuration ├── consumer-rules.pro └── java.header ├── .editorconfig ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .github ├── CODEOWNERS ├── workflows │ ├── notify_release.yml │ ├── issue_labeled.yml │ ├── notify_pull_request.yml │ ├── codecov_code_coverage.yml │ ├── issue_closed.yml │ ├── issue_comment.yml │ └── release_pr.yml └── PULL_REQUEST_TEMPLATE.md ├── scripts ├── fastlane │ ├── Appfile │ └── Pluginfile └── Gemfile ├── codecov.yml ├── CODE_OF_CONDUCT.md ├── settings.gradle.kts ├── gradle.properties └── .gitignore /testing/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /authenticator/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /liveness/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /buildNative -------------------------------------------------------------------------------- /liveness/src/test/resources/robolectric.properties: -------------------------------------------------------------------------------- 1 | sdk=28 -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -------------------------------------------------------------------------------- /samples/liveness/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /buildNative 3 | **/awsconfiguration.json 4 | **/amplifyconfiguration**.json -------------------------------------------------------------------------------- /configuration/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -keepclassmembers enum * { *; } 2 | 3 | -keep class com.amplifyframework.** { *; } 4 | -------------------------------------------------------------------------------- /samples/authenticator/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /buildNative 3 | **/awsconfiguration.json 4 | **/amplifyconfiguration**.json -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{kt,kts}] 2 | #this is to match java checkstyle 3 | max_line_length=120 4 | ktlint_code_style=android_studio -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/liveness/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/authenticator/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @aws-amplify/amplify-android @aws-amplify/amplify-ui 2 | 3 | # Changes to api surface require admin approval 4 | *.api @aws-amplify/amplify-android-admins 5 | -------------------------------------------------------------------------------- /liveness/src/main/assets/face_detection_short_range.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/liveness/src/main/assets/face_detection_short_range.tflite -------------------------------------------------------------------------------- /authenticator/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | # Keep AuthExceptions names since these can be mapped to error strings reflectively 2 | -keepnames class * extends com.amplifyframework.auth.AuthException -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_invalid-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_invalid-email.png -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInTest_password-visible.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInTest_password-visible.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInTest_ready-to-submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInTest_ready-to-submit.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_invalid-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_invalid-password.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_password-visible.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_password-visible.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_ready-to-submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_ready-to-submit.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_username-exists.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_username-exists.png -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInTest_username-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInTest_username-not-found.png -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasskeyCreatedTest_done-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasskeyCreatedTest_done-selected.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasswordResetTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasswordResetTest_default-state.png -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/liveness/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmMfaTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmMfaTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_passwordless-with-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_passwordless-with-email.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_passwords-do-not-match.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_passwords-do-not-match.png -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasskeyCreatedTest_with-one-passkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasskeyCreatedTest_with-one-passkey.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasswordResetTest_username-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasswordResetTest_username-not-found.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmMfaTest_incorrect-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmMfaTest_incorrect-code.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignUpTest_passwordless-with-username.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignUpTest_passwordless-with-username.png -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/samples/authenticator/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /scripts/fastlane/Appfile: -------------------------------------------------------------------------------- 1 | json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one 2 | package_name("com.amplifyframework.ui") # e.g. com.krausefx.app 3 | -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasskeyCreationPromptTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasskeyCreationPromptTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasswordResetConfirmTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasswordResetConfirmTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmPasswordTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmPasswordTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmTotpCodeTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmTotpCodeTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmTotpCodeTest_invalid-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmTotpCodeTest_invalid-code.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInSelectAuthFactorTest_no-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInSelectAuthFactorTest_no-password.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasskeyCreatedTest_with-multiple-passkeys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasskeyCreatedTest_with-multiple-passkeys.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasskeyCreationPromptTest_creating-passkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasskeyCreationPromptTest_creating-passkey.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmPasswordTest_password-visible.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmPasswordTest_password-visible.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmPasswordTest_ready-to-submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmPasswordTest_ready-to-submit.png -------------------------------------------------------------------------------- /samples/authenticator/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.android.application) apply false 3 | alias(libs.plugins.kotlin.android) apply false 4 | alias(libs.plugins.compose.compiler) apply false 5 | } 6 | -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasswordResetConfirmTest_passwords-do-not-match.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasswordResetConfirmTest_passwords-do-not-match.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInContinueWithEmailSetupTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInContinueWithEmailSetupTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInContinueWithTotpSetupTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInContinueWithTotpSetupTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInContinueWithMfaSelectionTest_default-state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInContinueWithMfaSelectionTest_default-state.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasskeyCreationPromptTest_skipping-passkey-creation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasskeyCreationPromptTest_skipping-passkey-creation.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/PasswordResetConfirmTest_incorrect-confirmation-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/PasswordResetConfirmTest_incorrect-confirmation-code.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmPasswordTest_ready-to-submit-with-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmPasswordTest_ready-to-submit-with-email.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInSelectAuthFactorTest_default-state-with-all-factors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInSelectAuthFactorTest_default-state-with-all-factors.png -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInConfirmPasswordTest_ready-to-submit-with-phonenumber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInConfirmPasswordTest_ready-to-submit-with-phonenumber.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /samples/liveness/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInSelectAuthFactorTest_default-state-with-all-factors-with-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInSelectAuthFactorTest_default-state-with-all-factors-with-email.png -------------------------------------------------------------------------------- /samples/authenticator/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /scripts/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | gem "addressable", ">= 2.8.0" 5 | gem "rexml", ">= 3.4.2" 6 | 7 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 8 | eval_gemfile(plugins_path) if File.exist?(plugins_path) 9 | -------------------------------------------------------------------------------- /samples/liveness/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.android.application) apply false 3 | alias(libs.plugins.kotlin.android) apply false 4 | alias(libs.plugins.compose.compiler) apply false 5 | alias(libs.plugins.kotlin.serialization) apply false 6 | } 7 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/util/AuthenticatorUiConstants.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.util 2 | 3 | import androidx.compose.ui.unit.dp 4 | 5 | internal object AuthenticatorUiConstants { 6 | val spaceBetweenFields = 8.dp 7 | } 8 | -------------------------------------------------------------------------------- /authenticator/src/test/screenshots/SignInSelectAuthFactorTest_default-state-with-all-factors-with-phone-number.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-amplify/amplify-ui-android/HEAD/authenticator/src/test/screenshots/SignInSelectAuthFactorTest_default-state-with-all-factors-with-phone-number.png -------------------------------------------------------------------------------- /liveness/src/main/java/com/amplifyframework/ui/liveness/util/WebSocketCloseCode.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.liveness.util 2 | 3 | internal enum class WebSocketCloseCode(val code: Int) { 4 | TIMEOUT(4001), 5 | CANCELED(4003), 6 | RUNTIME_ERROR(4005), 7 | DISPOSED(4008) 8 | } 9 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: auto 6 | threshold: 0.1% 7 | patch: 8 | default: 9 | target: auto 10 | threshold: 0% 11 | comment: 12 | layout: diff 13 | behavior: default 14 | require_changes: false 15 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/enums/SignInSource.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.enums 2 | 3 | internal enum class SignInSource { 4 | // Standard sign in 5 | SignIn, 6 | 7 | // Automatic sign in after completing sign up 8 | AutoSignIn 9 | } 10 | -------------------------------------------------------------------------------- /samples/liveness/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/util/OsBuild.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.util 2 | 3 | import android.os.Build 4 | 5 | // Facade for android.os.Build to facilitate testing 6 | internal class OsBuild { 7 | val sdkInt: Int 8 | get() = Build.VERSION.SDK_INT 9 | } 10 | -------------------------------------------------------------------------------- /scripts/fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-release_actions', git: 'https://github.com/aws-amplify/amplify-ci-support', branch: 'android/fastlane-actions', glob: 'src/fastlane/release_actions/*.gemspec' 6 | gem 'fastlane-plugin-semantic_release' 7 | -------------------------------------------------------------------------------- /samples/backend-lambda-functions/createSession/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create", 3 | "version": "2.0.0", 4 | "main": "index.js", 5 | "license": "Apache-2.0", 6 | "type": "module", 7 | "dependencies": { 8 | "@aws-sdk/client-rekognition": "latest" 9 | }, 10 | "devDependencies": { 11 | "@types/aws-lambda": "^8.10.92" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/backend-lambda-functions/getResults/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getresults", 3 | "version": "2.0.0", 4 | "main": "index.js", 5 | "license": "Apache-2.0", 6 | "type": "module", 7 | "dependencies": { 8 | "@aws-sdk/client-rekognition": "latest" 9 | }, 10 | "devDependencies": { 11 | "@types/aws-lambda": "^8.10.92" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /authenticator/src/main/res/drawable/ic_authenticator_clear.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /liveness/README.md: -------------------------------------------------------------------------------- 1 | # Face Liveness 2 | 3 | Amplify FaceLivenessDetector provides a UI component for [Amazon Rekognition Face Liveness](https://aws.amazon.com/rekognition/face-liveness/) feature that helps developers verify that only real users, not bad actors using spoofs, can access your services. 4 | 5 | More information on setting up and using the FaceLivenessDetector is in the [Amplify UI Face Liveness documentation](https://ui.docs.amplify.aws/android/connected-components/liveness). 6 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/states/MutableActionState.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.states 2 | 3 | import com.amplifyframework.ui.authenticator.AuthenticatorActionState 4 | 5 | internal interface MutableActionState : AuthenticatorActionState { 6 | override var action: T? 7 | } 8 | 9 | internal inline fun MutableActionState.withAction(action: T, func: () -> Unit) { 10 | this.action = action 11 | func() 12 | this.action = null 13 | } 14 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/util/ContextExtensions.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.util 2 | 3 | import android.app.Activity 4 | import android.content.Context 5 | import android.content.ContextWrapper 6 | 7 | /** 8 | * Allows us to get the Activity reference from Compose LocalContext 9 | */ 10 | internal tailrec fun Context.findActivity(): Activity? = when (this) { 11 | is Activity -> this 12 | is ContextWrapper -> this.baseContext.findActivity() 13 | else -> null 14 | } 15 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/locals/LocalAuthenticatorStep.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.locals 2 | 3 | import androidx.compose.runtime.compositionLocalOf 4 | import com.amplifyframework.ui.authenticator.enums.AuthenticatorStep 5 | 6 | /** 7 | * This composition local supplies the current AuthenticatorStep. This allows descendant composables to tailor 8 | * their content to specific steps. 9 | */ 10 | internal val LocalAuthenticatorStep = compositionLocalOf { AuthenticatorStep.Loading } 11 | -------------------------------------------------------------------------------- /authenticator/src/main/res/drawable/ic_authenticator_calendar.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /authenticator/src/main/res/drawable/ic_authenticator_search.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/util/AmplifyResult.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.util 2 | 3 | import com.amplifyframework.auth.AuthException 4 | 5 | internal sealed interface AmplifyResult { 6 | data class Success(val data: T) : AmplifyResult 7 | data class Error(val error: AuthException) : AmplifyResult 8 | } 9 | 10 | internal inline fun AmplifyResult.getOrDefault(crossinline provider: () -> T) = when (this) { 11 | is AmplifyResult.Error -> provider() 12 | is AmplifyResult.Success -> this.data 13 | } 14 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/data/UserInfo.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.data 2 | 3 | import com.amplifyframework.ui.authenticator.enums.SignInSource 4 | 5 | internal data class UserInfo( 6 | val username: String, 7 | val password: String?, 8 | val signInSource: SignInSource, 9 | val selectedAuthFactor: AuthFactor? = null 10 | ) { 11 | override fun toString() = "UserInfo(" + 12 | "username=$username, " + 13 | "password=***, " + 14 | "signInSource=$signInSource, " + 15 | "selectedAuthFactor=$selectedAuthFactor)" 16 | } 17 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | includeBuild("build-logic") 3 | repositories { 4 | gradlePluginPortal() 5 | google() 6 | mavenCentral() 7 | } 8 | } 9 | 10 | dependencyResolutionManagement { 11 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 12 | repositories { 13 | google() 14 | mavenCentral() 15 | } 16 | } 17 | 18 | rootProject.name = "amplify-ui-android" 19 | include(":liveness") 20 | include(":authenticator") 21 | include(":testing") 22 | 23 | // Enable typesafe accessor generation for cross-project references 24 | enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") 25 | -------------------------------------------------------------------------------- /.github/workflows/notify_release.yml: -------------------------------------------------------------------------------- 1 | name: Notify Amplify UI Android Release 2 | 3 | on: 4 | release: 5 | types: [created, published] 6 | 7 | jobs: 8 | notify: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Run webhook curl command 12 | env: 13 | WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }} 14 | VERSION: ${{github.event.release.html_url}} 15 | REPO_URL: ${{github.event.repository.html_url}} 16 | ACTION_NAME: ${{github.event.action}} 17 | shell: bash 18 | run: echo $VERSION | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"action":"'$ACTION_NAME'", "repo":"'$REPO_URL'", "version":"{}"}' 19 | -------------------------------------------------------------------------------- /configuration/java.header: -------------------------------------------------------------------------------- 1 | ^/\*$ 2 | ^ \* Copyright \d{4} Amazon\.com, Inc\. or its affiliates\. All Rights Reserved\.$ 3 | ^ \*$ 4 | ^ \* Licensed under the Apache License, Version 2\.0 \(the \"License\"\)\.$ 5 | ^ \* You may not use this file except in compliance with the License\.$ 6 | ^ \* A copy of the License is located at$ 7 | ^ \*$ 8 | ^ \* http://aws\.amazon\.com/apache2\.0$ 9 | ^ \*$ 10 | ^ \* or in the \"license\" file accompanying this file\. This file is distributed$ 11 | ^ \* on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either$ 12 | ^ \* express or implied\. See the License for the specific language governing$ 13 | ^ \* permissions and limitations under the License\.$ 14 | ^ \*/$ 15 | 16 | -------------------------------------------------------------------------------- /.github/workflows/issue_labeled.yml: -------------------------------------------------------------------------------- 1 | name: Issue Labeled 2 | on: 3 | issues: 4 | types: [labeled] 5 | 6 | jobs: 7 | remove-pending-triage-label: 8 | runs-on: ubuntu-latest 9 | if: ${{ contains(fromJSON('["question", "bug", "feature-request"]'), github.event.label.name) }} 10 | permissions: 11 | issues: write 12 | steps: 13 | - name: Remove the pending-triage label 14 | shell: bash 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | ISSUE_NUMBER: ${{ github.event.issue.number }} 18 | REPOSITORY_NAME: ${{ github.event.repository.full_name }} 19 | run: | 20 | gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-triage" -------------------------------------------------------------------------------- /samples/liveness/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | includeBuild("../../build-logic") 3 | repositories { 4 | google() 5 | mavenCentral() 6 | gradlePluginPortal() 7 | } 8 | } 9 | 10 | dependencyResolutionManagement { 11 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 12 | repositories { 13 | google() 14 | mavenCentral() 15 | } 16 | versionCatalogs { 17 | create("libs") { 18 | from(files("../../gradle/libs.versions.toml")) 19 | } 20 | } 21 | } 22 | 23 | rootProject.name = "Liveness-Sample" 24 | include(":app") 25 | 26 | // Uncomment this to use local liveness module from Amplify UI Repo 27 | //includeBuild("../../") {} 28 | -------------------------------------------------------------------------------- /.github/workflows/notify_pull_request.yml: -------------------------------------------------------------------------------- 1 | name: Notify Pull Request 2 | 3 | on: 4 | pull_request: 5 | types: [opened, ready_for_review, reopened] 6 | 7 | jobs: 8 | notify: 9 | runs-on: ubuntu-latest 10 | if: ${{ !github.event.draft }} 11 | steps: 12 | - name: Run webhook curl command 13 | env: 14 | WEBHOOK_URL: ${{ secrets.SLACK_PR_WEBHOOK_URL }} 15 | URL: ${{ github.event.pull_request.html_url }} 16 | TITLE: ${{ github.event.pull_request.title }} 17 | USER: ${{ github.event.pull_request.user.login }} 18 | shell: bash 19 | run: curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data "{\"url\":\"$URL\", \"title\":\"$TITLE\", \"user\":\"$USER\"}" 20 | -------------------------------------------------------------------------------- /authenticator/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/authenticator/app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("amplify.android.application") 3 | } 4 | 5 | android { 6 | namespace = "com.amplifyframework.ui.sample.authenticator" 7 | } 8 | 9 | dependencies { 10 | val authenticatorVersion = "1.6.0" 11 | 12 | implementation(platform(libs.androidx.compose.bom)) 13 | implementation("com.amplifyframework.ui:authenticator:$authenticatorVersion") 14 | 15 | implementation(libs.bundles.compose) 16 | implementation(libs.androidx.compose.material.icons) 17 | implementation(libs.androidx.lifecycle) 18 | implementation(libs.androidx.activity.compose) 19 | implementation(libs.samples.androidx.datastore.prefs) 20 | 21 | coreLibraryDesugaring(libs.android.desugar) 22 | } 23 | -------------------------------------------------------------------------------- /samples/authenticator/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | includeBuild("../../build-logic") 3 | repositories { 4 | google() 5 | mavenCentral() 6 | gradlePluginPortal() 7 | } 8 | } 9 | 10 | dependencyResolutionManagement { 11 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 12 | repositories { 13 | google() 14 | mavenCentral() 15 | } 16 | versionCatalogs { 17 | create("libs") { 18 | from(files("../../gradle/libs.versions.toml")) 19 | } 20 | } 21 | } 22 | 23 | rootProject.name = "Authenticator-Sample" 24 | include(":app") 25 | 26 | // Uncomment this to use local authenticator module from Amplify UI Repo 27 | includeBuild("../../") {} 28 | -------------------------------------------------------------------------------- /samples/backend-lambda-functions/createSession/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | RekognitionClient, 3 | CreateFaceLivenessSessionCommand, 4 | } from '@aws-sdk/client-rekognition'; 5 | 6 | /** 7 | * @type {import('@types/aws-lambda').APIGatewayProxyHandler} 8 | */ 9 | 10 | export const handler = async (event, req) => { 11 | const client = new RekognitionClient({ region: 'us-east-1' }); 12 | const command = new CreateFaceLivenessSessionCommand({}); 13 | const response = await client.send(command); 14 | 15 | return { 16 | statusCode: 200, 17 | headers: { 18 | 'Access-Control-Allow-Origin': '*', 19 | 'Access-Control-Allow-Headers': '*', 20 | }, 21 | body: JSON.stringify({ sessionId: response.SessionId }), 22 | }; 23 | }; 24 | -------------------------------------------------------------------------------- /authenticator/src/test/java/com/amplifyframework/ui/authenticator/ui/robots/PasskeyCreatedRobot.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.ui.robots 2 | 3 | import androidx.compose.ui.test.junit4.ComposeTestRule 4 | import com.amplifyframework.ui.authenticator.ui.TestTags 5 | import com.amplifyframework.ui.testing.ComposeTest 6 | 7 | fun ComposeTest.passkeyCreated(func: PasskeyCreatedRobot.() -> Unit) = PasskeyCreatedRobot(composeTestRule).func() 8 | 9 | class PasskeyCreatedRobot(rule: ComposeTestRule) : ScreenLevelRobot(rule) { 10 | fun hasContinueButton(expected: String) = assertExists(TestTags.ContinueButton, expected) 11 | fun hasPasskeyText(text: String) = assertExists(text) 12 | 13 | fun clickContinueButton() = clickOnTag(TestTags.ContinueButton) 14 | } 15 | -------------------------------------------------------------------------------- /authenticator/src/main/java/com/amplifyframework/ui/authenticator/options/TotpOptions.kt: -------------------------------------------------------------------------------- 1 | package com.amplifyframework.ui.authenticator.options 2 | 3 | /** 4 | * Options for configuring the 5 | * [TOTP MFA](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa-totp.html) experience. 6 | */ 7 | data class TotpOptions( 8 | /** 9 | * The 'issuer' is the title displayed in a user's authenticator application, preceding the account name. 10 | * In most cases this should be the name of your app. For example, if your app is called "My App", your user 11 | * will see "My App - Username" in their authenticator application. 12 | * Defaults to the name of the Android application if not supplied. 13 | */ 14 | val issuer: String? = null 15 | ) 16 | -------------------------------------------------------------------------------- /samples/authenticator/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | Amplify Authenticator 18 | 19 | -------------------------------------------------------------------------------- /testing/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /liveness/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | POM_ARTIFACT_ID=liveness 17 | POM_NAME=Amplify UI Framework for Android - Liveness 18 | POM_DESCRIPTION=Amplify UI Framework for Android - Liveness Plugin 19 | POM_PACKAGING=aar 20 | VERSION_NAME=1.8.2 21 | -------------------------------------------------------------------------------- /samples/authenticator/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | 17 | #amplify-do-not-edit-begin 18 | amplify/\#current-cloud-backend 19 | amplify/.config/local-* 20 | amplify/logs 21 | amplify/mock-data 22 | amplify/mock-api-resources 23 | amplify/backend/amplify-meta.json 24 | amplify/backend/.temp 25 | build/ 26 | dist/ 27 | node_modules/ 28 | aws-exports.js 29 | awsconfiguration.json 30 | amplifyconfiguration.json 31 | amplifyconfiguration.dart 32 | amplify-build-config.json 33 | amplify-gradle-config.json 34 | amplifytools.xcconfig 35 | .secret-* 36 | **.sample 37 | #amplify-do-not-edit-end 38 | -------------------------------------------------------------------------------- /authenticator/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("amplify.android.ui.component") 3 | } 4 | 5 | android { 6 | namespace = "com.amplifyframework.ui.authenticator" 7 | defaultConfig { 8 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 9 | consumerProguardFiles += file("consumer-rules.pro") 10 | } 11 | 12 | compileOptions { 13 | isCoreLibraryDesugaringEnabled = true 14 | } 15 | } 16 | 17 | dependencies { 18 | implementation(platform(libs.androidx.compose.bom)) 19 | 20 | api(libs.amplify.auth) 21 | 22 | implementation(libs.bundles.compose) 23 | implementation(libs.androidx.lifecycle) 24 | implementation(libs.androidx.compose.viewmodel) 25 | implementation(libs.zxing) 26 | coreLibraryDesugaring(libs.android.desugar) 27 | 28 | testImplementation(projects.testing) 29 | } 30 | -------------------------------------------------------------------------------- /authenticator/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | POM_ARTIFACT_ID=authenticator 17 | POM_NAME=Amplify UI Framework for Android - Authenticator 18 | POM_DESCRIPTION=Amplify UI Framework for Android - Authenticator Plugin 19 | POM_PACKAGING=aar 20 | VERSION_NAME=1.8.0 21 | -------------------------------------------------------------------------------- /liveness/src/main/cpp/liveness_jni_hooks.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | extern "C" { 20 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) { 21 | return JNI_VERSION_1_6; 22 | } 23 | } -------------------------------------------------------------------------------- /samples/liveness/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 |