Repository: auth0/Lock.Android Branch: main Commit: ef8b0606851f Files: 233 Total size: 1.0 MB Directory structure: gitextract_04ecnqqv/ ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── CODEOWNERS │ ├── ISSUE_TEMPLATE/ │ │ ├── Bug Report.yml │ │ ├── Feature Request.yml │ │ └── config.yml │ ├── PULL_REQUEST_TEMPLATE.md │ ├── actions/ │ │ ├── get-prerelease/ │ │ │ └── action.yml │ │ ├── get-release-notes/ │ │ │ └── action.yml │ │ ├── get-version/ │ │ │ └── action.yml │ │ ├── maven-publish/ │ │ │ └── action.yml │ │ ├── release-create/ │ │ │ └── action.yml │ │ ├── setup/ │ │ │ └── action.yml │ │ └── tag-exists/ │ │ └── action.yml │ ├── dependabot.yml │ ├── stale.yml │ └── workflows/ │ ├── codeql.yml │ ├── java-release.yml │ ├── release.yml │ ├── sca_scan.yml │ └── test.yml ├── .gitignore ├── .shiprc ├── .version ├── CHANGELOG.md ├── EXAMPLES.md ├── LICENSE.md ├── MIGRATION_GUIDE.md ├── README.md ├── app/ │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ ├── release-test.jks │ └── src/ │ └── main/ │ ├── AndroidManifest.xml │ ├── java/ │ │ └── com/ │ │ └── auth0/ │ │ └── android/ │ │ └── lock/ │ │ └── app/ │ │ └── DemoActivity.kt │ └── res/ │ ├── layout/ │ │ └── demo_activity.xml │ └── values/ │ ├── auth0.xml │ ├── colors.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew ├── gradlew.bat ├── lib/ │ ├── .gitignore │ ├── build.gradle │ ├── lint.xml │ ├── proguard-rules.pro │ └── src/ │ ├── main/ │ │ ├── AndroidManifest.xml │ │ ├── assets/ │ │ │ └── com_auth0_lock_passwordless_countries.json │ │ ├── java/ │ │ │ └── com/ │ │ │ └── auth0/ │ │ │ └── android/ │ │ │ └── lock/ │ │ │ ├── Auth0Parcelable.java │ │ │ ├── AuthButtonSize.java │ │ │ ├── AuthenticationCallback.java │ │ │ ├── Constants.java │ │ │ ├── CountryCodeActivity.java │ │ │ ├── InitialScreen.java │ │ │ ├── Lock.java │ │ │ ├── LockActivity.java │ │ │ ├── LockCallback.java │ │ │ ├── PasswordlessIdentityHelper.java │ │ │ ├── PasswordlessLock.java │ │ │ ├── PasswordlessLockActivity.java │ │ │ ├── UsernameStyle.java │ │ │ ├── WebCallbackWrapper.java │ │ │ ├── WebProvider.java │ │ │ ├── adapters/ │ │ │ │ ├── Country.java │ │ │ │ └── CountryAdapter.java │ │ │ ├── errors/ │ │ │ │ ├── AuthenticationError.java │ │ │ │ ├── ErrorMessageBuilder.java │ │ │ │ ├── LoginErrorMessageBuilder.java │ │ │ │ └── SignUpErrorMessageBuilder.java │ │ │ ├── events/ │ │ │ │ ├── CountryCodeChangeEvent.java │ │ │ │ ├── DatabaseChangePasswordEvent.java │ │ │ │ ├── DatabaseEvent.java │ │ │ │ ├── DatabaseLoginEvent.java │ │ │ │ ├── DatabaseSignUpEvent.java │ │ │ │ ├── FetchApplicationEvent.java │ │ │ │ ├── LockMessageEvent.java │ │ │ │ ├── OAuthLoginEvent.java │ │ │ │ └── PasswordlessLoginEvent.java │ │ │ ├── internal/ │ │ │ │ └── configuration/ │ │ │ │ ├── ApplicationDeserializer.java │ │ │ │ ├── ApplicationFetcher.java │ │ │ │ ├── AuthMode.java │ │ │ │ ├── AuthType.java │ │ │ │ ├── BaseConnection.java │ │ │ │ ├── Configuration.java │ │ │ │ ├── Connection.java │ │ │ │ ├── DatabaseConnection.java │ │ │ │ ├── GsonDeserializer.java │ │ │ │ ├── OAuthConnection.java │ │ │ │ ├── Options.java │ │ │ │ ├── PasswordComplexity.java │ │ │ │ ├── PasswordStrength.java │ │ │ │ ├── PasswordlessConnection.java │ │ │ │ ├── PasswordlessMode.java │ │ │ │ └── Theme.java │ │ │ ├── provider/ │ │ │ │ └── AuthResolver.java │ │ │ ├── utils/ │ │ │ │ ├── CustomField.java │ │ │ │ ├── EnterpriseConnectionMatcher.java │ │ │ │ ├── HiddenField.java │ │ │ │ ├── LoadCountriesTask.java │ │ │ │ └── SignUpField.java │ │ │ └── views/ │ │ │ ├── ActionButton.java │ │ │ ├── AuthConfig.java │ │ │ ├── ChangePasswordFormView.java │ │ │ ├── CheckableOptionView.java │ │ │ ├── ClassicLockView.java │ │ │ ├── CountryCodeSelectorView.java │ │ │ ├── CustomFieldsFormView.java │ │ │ ├── FormLayout.java │ │ │ ├── FormView.java │ │ │ ├── HeaderView.java │ │ │ ├── ImageCheckbox.java │ │ │ ├── LinkTextView.java │ │ │ ├── LogInFormView.java │ │ │ ├── MFACodeFormView.java │ │ │ ├── ModeSelectionView.java │ │ │ ├── PasswordStrengthView.java │ │ │ ├── PasswordlessFormLayout.java │ │ │ ├── PasswordlessInputCodeFormView.java │ │ │ ├── PasswordlessLockView.java │ │ │ ├── PasswordlessRequestCodeFormView.java │ │ │ ├── SignUpFormView.java │ │ │ ├── SocialButton.java │ │ │ ├── SocialView.java │ │ │ ├── SocialViewAdapter.java │ │ │ ├── SpacesItemDecoration.java │ │ │ ├── ValidatedInputView.java │ │ │ ├── ValidatedPasswordInputView.java │ │ │ ├── ValidatedUsernameInputView.java │ │ │ ├── ViewUtils.java │ │ │ └── interfaces/ │ │ │ ├── IdentityListener.java │ │ │ ├── LockWidget.java │ │ │ ├── LockWidgetForm.java │ │ │ ├── LockWidgetOAuth.java │ │ │ └── LockWidgetPasswordless.java │ │ └── res/ │ │ ├── color/ │ │ │ └── com_auth0_lock_text.xml │ │ ├── drawable/ │ │ │ ├── com_auth0_lock_link_background.xml │ │ │ ├── com_auth0_lock_tab.xml │ │ │ └── com_auth0_lock_terms.xml │ │ ├── layout/ │ │ │ ├── com_auth0_lock_action_button.xml │ │ │ ├── com_auth0_lock_activity_lock.xml │ │ │ ├── com_auth0_lock_activity_lock_passwordless.xml │ │ │ ├── com_auth0_lock_btn_social_large.xml │ │ │ ├── com_auth0_lock_changepwd_form_view.xml │ │ │ ├── com_auth0_lock_checkable_option.xml │ │ │ ├── com_auth0_lock_custom_fields_form_view.xml │ │ │ ├── com_auth0_lock_error_layout.xml │ │ │ ├── com_auth0_lock_header.xml │ │ │ ├── com_auth0_lock_login_form_view.xml │ │ │ ├── com_auth0_lock_mfa_input_code_form_view.xml │ │ │ ├── com_auth0_lock_password_strength.xml │ │ │ ├── com_auth0_lock_passwordless_activity_country_code.xml │ │ │ ├── com_auth0_lock_passwordless_country_code_selector.xml │ │ │ ├── com_auth0_lock_passwordless_input_code_form_view.xml │ │ │ ├── com_auth0_lock_passwordless_item_country_code.xml │ │ │ ├── com_auth0_lock_passwordless_request_code_form_view.xml │ │ │ ├── com_auth0_lock_signup_form_view.xml │ │ │ ├── com_auth0_lock_sso_layout.xml │ │ │ ├── com_auth0_lock_tab.xml │ │ │ ├── com_auth0_lock_tab_layout.xml │ │ │ ├── com_auth0_lock_terms_layout.xml │ │ │ └── com_auth0_lock_validated_input_view.xml │ │ ├── values/ │ │ │ ├── attrs.xml │ │ │ ├── auth_styles.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── ids.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── values-sw400dp/ │ │ └── dimens.xml │ └── test/ │ ├── AndroidManifest.xml │ ├── java/ │ │ └── com/ │ │ └── auth0/ │ │ └── android/ │ │ └── lock/ │ │ ├── Auth0ParcelableTest.java │ │ ├── AuthenticationCallbackTest.java │ │ ├── ClassicBuilderTest.java │ │ ├── LockActivityTest.java │ │ ├── PasswordlessBuilderTest.java │ │ ├── PasswordlessIdentityHelperTest.java │ │ ├── PasswordlessLockActivityTest.java │ │ ├── WebProviderTest.java │ │ ├── errors/ │ │ │ ├── LoginErrorMessageBuilderTest.java │ │ │ └── SignUpErrorMessageBuilderTest.java │ │ ├── events/ │ │ │ ├── DatabaseEventTest.java │ │ │ ├── DatabaseLoginEventTest.java │ │ │ ├── DatabaseSignUpEventTest.java │ │ │ ├── ErrorMessageEventTest.java │ │ │ ├── OAuthLoginEventTest.java │ │ │ └── PasswordlessLoginEventTest.java │ │ ├── internal/ │ │ │ └── configuration/ │ │ │ ├── ApplicationFetcherTest.java │ │ │ ├── ApplicationGsonTest.java │ │ │ ├── ConfigurationTest.java │ │ │ ├── ConnectionGsonTest.java │ │ │ ├── ConnectionMatcher.java │ │ │ ├── ConnectionTest.java │ │ │ ├── DatabaseConnectionTest.java │ │ │ ├── EnterpriseConnectionMatcherTest.java │ │ │ ├── GsonBaseTest.java │ │ │ ├── OAuthConnectionTest.java │ │ │ ├── OptionsTest.java │ │ │ ├── PasswordlessConnectionTest.java │ │ │ └── ThemeTest.java │ │ ├── provider/ │ │ │ └── AuthResolverTest.java │ │ ├── utils/ │ │ │ ├── ApplicationAPI.java │ │ │ ├── Auth0AuthenticationCallbackMatcher.java │ │ │ ├── AuthenticationCallbackMatcher.java │ │ │ ├── CallbackMatcher.java │ │ │ ├── CustomFieldTest.java │ │ │ ├── HiddenFieldTest.java │ │ │ ├── MockAuthenticationCallback.java │ │ │ ├── MockCallback.java │ │ │ ├── MockLockCallback.java │ │ │ ├── SSLTestUtils.java │ │ │ └── TypeTokenMatcher.java │ │ └── views/ │ │ ├── AuthConfigTest.java │ │ ├── CustomFieldsFormViewTest.java │ │ └── PasswordStrengthViewTest.java │ └── resources/ │ ├── appinfo.json │ ├── application.json │ ├── db_connection.json │ ├── db_connection_with_complexity.json │ ├── empty_object.json │ ├── enterprise_connection.json │ ├── invalid.json │ ├── mockito-extensions/ │ │ └── org.mockito.plugins.MockMaker │ ├── social_connection.json │ └── strategy.json ├── opslevel.yml ├── proguard/ │ ├── proguard-gson.pro │ ├── proguard-lock-2.pro │ └── proguard-otto.pro └── settings.gradle ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ root = true [*] end_of_line = lf ================================================ FILE: .gitattributes ================================================ # We'll let Git's auto-detection algorithm infer if a file is text. If it is, # enforce LF line endings regardless of OS or git configurations. * text=auto eol=lf # Isolate binary files in case the auto-detection algorithm fails and # marks them as text files (which could brick them). *.{png,jpg,jpeg,gif,webp,woff,woff2} binary ================================================ FILE: .github/CODEOWNERS ================================================ * @auth0/project-dx-sdks-engineer-codeowner ================================================ FILE: .github/ISSUE_TEMPLATE/Bug Report.yml ================================================ name: 🐞 Report a bug description: Have you found a bug or issue? Create a bug report for this library labels: ["bug"] body: - type: markdown attributes: value: | **Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues. - type: checkboxes id: checklist attributes: label: Checklist options: - label: I have looked into the [Readme](https://github.com/auth0/Lock.Android#readme) and [Examples](https://github.com/auth0/Lock.Android/blob/main/EXAMPLES.md), and have not found a suitable solution or answer. required: true - label: I have looked into the [API documentation](https://javadoc.io/doc/com.auth0.android/lock/latest/index.html) and have not found a suitable solution or answer. required: true - label: I have searched the [issues](https://github.com/auth0/Lock.Android/issues) and have not found a suitable solution or answer. required: true - label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer. required: true - label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). required: true - type: textarea id: description attributes: label: Description description: Provide a clear and concise description of the issue, including what you expected to happen. validations: required: true - type: textarea id: reproduction attributes: label: Reproduction description: Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent. placeholder: | 1. Step 1... 2. Step 2... 3. ... validations: required: true - type: textarea id: additional-context attributes: label: Additional context description: Other libraries that might be involved, or any other relevant information you think would be useful. validations: required: false - type: input id: environment-version attributes: label: Lock.Android version validations: required: true - type: input id: environment-platform-version attributes: label: Android version(s) validations: required: true ================================================ FILE: .github/ISSUE_TEMPLATE/Feature Request.yml ================================================ name: 🧩 Feature request description: Suggest an idea or a feature for this library labels: ["feature request"] body: - type: checkboxes id: checklist attributes: label: Checklist options: - label: I have looked into the [Readme](https://github.com/auth0/Lock.Android#readme) and [Examples](https://github.com/auth0/Lock.Android/blob/main/EXAMPLES.md), and have not found a suitable solution or answer. required: true - label: I have looked into the [API documentation](https://javadoc.io/doc/com.auth0.android/lock/latest/index.html) and have not found a suitable solution or answer. required: true - label: I have searched the [issues](https://github.com/auth0/Lock.Android/issues) and have not found a suitable solution or answer. required: true - label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer. required: true - label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). required: true - type: textarea id: description attributes: label: Describe the problem you'd like to have solved description: A clear and concise description of what the problem is. placeholder: I'm always frustrated when... validations: required: true - type: textarea id: ideal-solution attributes: label: Describe the ideal solution description: A clear and concise description of what you want to happen. validations: required: true - type: textarea id: alternatives-and-workarounds attributes: label: Alternatives and current workarounds description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place. validations: required: false - type: textarea id: additional-context attributes: label: Additional context description: Add any other context or screenshots about the feature request here. validations: required: false ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false contact_links: - name: Auth0 Community url: https://community.auth0.com about: Discuss this SDK in the Auth0 Community forums ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ### Changes Please describe both what is changing and why this is important. Include: - Classes and methods added, deleted, deprecated, or changed - Screenshots of new or changed UI, if applicable - A summary of usage if this is a new feature or change to a public API (this should also be added to relevant documentation once released) ### References Please include relevant links supporting this change such as a: - support ticket - community post - StackOverflow post - support forum thread Please note any links that are not publicly accessible. ### Testing Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. This library has unit testing, tests should be added for new logic and functionality and existing tests should complete without errors. - [ ] This change adds unit test coverage - [ ] This change adds integration/UI test coverage - [ ] This change has been tested on the latest version of the platform/language or why not ### Checklist - [ ] I have read the [Auth0 general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) - [ ] I have read the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) - [ ] All existing and new tests complete without errors - [ ] The correct base branch is being used ================================================ FILE: .github/actions/get-prerelease/action.yml ================================================ name: Return a boolean indicating if the version contains prerelease identifiers # # Returns a simple true/false boolean indicating whether the version indicates it's a prerelease or not. # # TODO: Remove once the common repo is public. # inputs: version: required: true outputs: prerelease: value: ${{ steps.get_prerelease.outputs.PRERELEASE }} runs: using: composite steps: - id: get_prerelease shell: bash run: | if [[ "${VERSION}" == *"beta"* || "${VERSION}" == *"alpha"* ]]; then echo "PRERELEASE=true" >> $GITHUB_OUTPUT else echo "PRERELEASE=false" >> $GITHUB_OUTPUT fi env: VERSION: ${{ inputs.version }} ================================================ FILE: .github/actions/get-release-notes/action.yml ================================================ name: Return the release notes extracted from the body of the PR associated with the release. # # Returns the release notes from the content of a pull request linked to a release branch. It expects the branch name to be in the format release/vX.Y.Z, release/X.Y.Z, release/vX.Y.Z-beta.N. etc. # # TODO: Remove once the common repo is public. # inputs: version: required: true repo_name: required: false repo_owner: required: true token: required: true outputs: release-notes: value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }} runs: using: composite steps: - uses: actions/github-script@v7 id: get_release_notes with: result-encoding: string script: | const { data: pulls } = await github.rest.pulls.list({ owner: process.env.REPO_OWNER, repo: process.env.REPO_NAME, state: 'all', head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`, }); core.setOutput('RELEASE_NOTES', pulls[0].body); env: GITHUB_TOKEN: ${{ inputs.token }} REPO_OWNER: ${{ inputs.repo_owner }} REPO_NAME: ${{ inputs.repo_name }} VERSION: ${{ inputs.version }} ================================================ FILE: .github/actions/get-version/action.yml ================================================ name: Return the version extracted from the branch name # # Returns the version from the .version file. # # TODO: Remove once the common repo is public. # outputs: version: value: ${{ steps.get_version.outputs.VERSION }} runs: using: composite steps: - id: get_version shell: bash run: | VERSION=$(head -1 .version) echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT ================================================ FILE: .github/actions/maven-publish/action.yml ================================================ name: Publish release to Java inputs: ossr-username: required: true ossr-password: required: true signing-key: required: true signing-password: required: true java-version: required: true is-android: required: true version: required: true runs: using: composite steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Java shell: bash run: | curl -s "https://get.sdkman.io" | bash source "/home/runner/.sdkman/bin/sdkman-init.sh" sdk list java sdk install java "$JAVA_VERSION" && sdk default java "$JAVA_VERSION" env: JAVA_VERSION: ${{ inputs.java-version }} - uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # pin@1.1.0 - name: Publish Java shell: bash if: inputs.is-android == 'false' run: ./gradlew clean assemble sign publishMavenJavaPublicationToMavenRepository -PisSnapshot=false -Pversion="$VERSION" -PossrhUsername="$OSSR_USERNAME" -PossrhPassword="$OSSR_PASSWORD" -PsigningKey="$SIGNING_KEY" -PsigningPassword="$SIGNING_PASSWORD" env: VERSION: ${{ inputs.version }} OSSR_USERNAME: ${{ inputs.ossr-username }} OSSR_PASSWORD: ${{ inputs.ossr-password }} SIGNING_KEY: ${{ inputs.signing-key }} SIGNING_PASSWORD: ${{ inputs.signing-password }} - name: Publish Android shell: bash if: inputs.is-android == 'true' run: ./gradlew clean assemble sign publishAndroidLibraryPublicationToMavenRepository -PisSnapshot=false -Pversion="$VERSION" -PossrhUsername="$OSSR_USERNAME" -PossrhPassword="$OSSR_PASSWORD" -PsigningKey="$SIGNING_KEY" -PsigningPassword="$SIGNING_PASSWORD" env: VERSION: ${{ inputs.version }} OSSR_USERNAME: ${{ inputs.ossr-username }} OSSR_PASSWORD: ${{ inputs.ossr-password }} SIGNING_KEY: ${{ inputs.signing-key }} SIGNING_PASSWORD: ${{ inputs.signing-password }} ================================================ FILE: .github/actions/release-create/action.yml ================================================ name: Create a GitHub release # # Creates a GitHub release with the given version. # # TODO: Remove once the common repo is public. # inputs: token: required: true files: required: false name: required: true body: required: true tag: required: true commit: required: true draft: default: false required: false prerelease: default: false required: false fail_on_unmatched_files: default: true required: false runs: using: composite steps: - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 with: body: ${{ inputs.body }} name: ${{ inputs.name }} tag_name: ${{ inputs.tag }} target_commitish: ${{ inputs.commit }} draft: ${{ inputs.draft }} prerelease: ${{ inputs.prerelease }} fail_on_unmatched_files: ${{ inputs.fail_on_unmatched_files }} files: ${{ inputs.files }} env: GITHUB_TOKEN: ${{ inputs.token }} ================================================ FILE: .github/actions/setup/action.yml ================================================ name: Configure CI description: Performs the initial configuration of the CI environment inputs: java: description: The Java version to use required: false default: '11' runs: using: composite steps: - name: Set up JDK uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # pin@4.8.0 env: JAVA_VERSION : ${{ inputs.java }} with: java-version: ${{ env.JAVA_VERSION }} distribution: 'temurin' - uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # pin@1.1.0 - name: Setup Gradle uses: gradle/actions/setup-gradle@748248ddd2a24f49513d8f472f81c3a07d4d50e1 # pin@4.4.4 - run: ./gradlew androidDependencies shell: bash ================================================ FILE: .github/actions/tag-exists/action.yml ================================================ name: Return a boolean indicating if a tag already exists for the repository # # Returns a simple true/false boolean indicating whether the tag exists or not. # # TODO: Remove once the common repo is public. # inputs: token: required: true tag: required: true outputs: exists: description: 'Whether the tag exists or not' value: ${{ steps.tag-exists.outputs.EXISTS }} runs: using: composite steps: - id: tag-exists shell: bash run: | GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}" http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s -H "Authorization: token ${GITHUB_TOKEN}") if [ "$http_status_code" -ne "404" ] ; then echo "EXISTS=true" >> $GITHUB_OUTPUT else echo "EXISTS=false" >> $GITHUB_OUTPUT fi env: TAG_NAME: ${{ inputs.tag }} GITHUB_TOKEN: ${{ inputs.token }} ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: - package-ecosystem: 'github-actions' directory: '/' schedule: interval: 'weekly' ================================================ FILE: .github/stale.yml ================================================ # Configuration for probot-stale - https://github.com/probot/stale # Number of days of inactivity before an Issue or Pull Request becomes stale daysUntilStale: 90 # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. daysUntilClose: 7 # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: [] # Set to true to ignore issues with an assignee (defaults to false) exemptAssignees: true # Label to use when marking as stale staleLabel: closed:stale # Comment to post when marking as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇‍♂️ ================================================ FILE: .github/workflows/codeql.yml ================================================ name: CodeQL on: merge_group: pull_request: types: - opened - synchronize push: branches: - main schedule: - cron: "37 10 * * 2" permissions: actions: read contents: read security-events: write concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: analyze: name: Check for Vulnerabilities runs-on: ubuntu-latest strategy: fail-fast: false matrix: language: [java] steps: - if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group' run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection. - name: Checkout uses: actions/checkout@v6 - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} queries: +security-and-quality - name: Autobuild uses: github/codeql-action/autobuild@v4 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 with: category: "/language:${{ matrix.language }}" ================================================ FILE: .github/workflows/java-release.yml ================================================ name: Create Java and GitHub Release on: workflow_call: inputs: java-version: required: true type: string is-android: required: true type: string secrets: ossr-username: required: true ossr-password: required: true signing-key: required: true signing-password: required: true github-token: required: true ### TODO: Replace instances of './.github/actions/' w/ `auth0/dx-sdk-actions/` and append `@latest` after the common `dx-sdk-actions` repo is made public. ### TODO: Also remove `get-prerelease`, `get-version`, `release-create`, `tag-create` and `tag-exists` actions from this repo's .github/actions folder once the repo is public. jobs: release: if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/')) runs-on: ubuntu-latest environment: release steps: # Checkout the code - uses: actions/checkout@v6 with: fetch-depth: 0 # Get the version from the branch name - id: get_version uses: ./.github/actions/get-version # Get the prerelease flag from the branch name - id: get_prerelease uses: ./.github/actions/get-prerelease with: version: ${{ steps.get_version.outputs.version }} # Get the release notes - id: get_release_notes uses: ./.github/actions/get-release-notes with: token: ${{ secrets.github-token }} version: ${{ steps.get_version.outputs.version }} repo_owner: ${{ github.repository_owner }} repo_name: ${{ github.event.repository.name }} # Check if the tag already exists - id: tag_exists uses: ./.github/actions/tag-exists with: tag: ${{ steps.get_version.outputs.version }} token: ${{ secrets.github-token }} # If the tag already exists, exit with an error - if: steps.tag_exists.outputs.exists == 'true' run: exit 1 # Publish the release to Maven - uses: ./.github/actions/maven-publish with: java-version: ${{ inputs.java-version }} is-android: ${{ inputs.is-android }} version: ${{ steps.get_version.outputs.version }} ossr-username: ${{ secrets.ossr-username }} ossr-password: ${{ secrets.ossr-password }} signing-key: ${{ secrets.signing-key }} signing-password: ${{ secrets.signing-password }} # Create a release for the tag - uses: ./.github/actions/release-create with: token: ${{ secrets.github-token }} name: ${{ steps.get_version.outputs.version }} body: ${{ steps.get_release_notes.outputs.release-notes }} tag: ${{ steps.get_version.outputs.version }} commit: ${{ github.sha }} prerelease: ${{ steps.get_prerelease.outputs.prerelease }} ================================================ FILE: .github/workflows/release.yml ================================================ name: Create GitHub Release on: pull_request: types: - closed workflow_dispatch: permissions: contents: write ### TODO: Replace instances of './.github/workflows/' w/ `auth0/dx-sdk-actions/workflows/` and append `@latest` after the common `dx-sdk-actions` repo is made public. ### TODO: Also remove `get-prerelease`, `get-release-notes`, `get-version`, `maven-publish`, `release-create`, and `tag-exists` actions from this repo's .github/actions folder once the repo is public. ### TODO: Also remove `java-release` workflow from this repo's .github/workflows folder once the repo is public. jobs: release: uses: ./.github/workflows/java-release.yml with: java-version: 8.0.382-tem is-android: true secrets: ossr-username: ${{ secrets.OSSR_USERNAME }} ossr-password: ${{ secrets.OSSR_PASSWORD }} signing-key: ${{ secrets.SIGNING_KEY }} signing-password: ${{ secrets.SIGNING_PASSWORD }} github-token: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/sca_scan.yml ================================================ name: SCA on: push: branches: ["master", "main"] jobs: snyk-cli: uses: auth0/devsecops-tooling/.github/workflows/sca-scan.yml@main secrets: inherit ================================================ FILE: .github/workflows/test.yml ================================================ name: Build and Test on: merge_group: workflow_dispatch: pull_request: branches: - main push: branches: - main permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: unit: name: Run Unit Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: ./.github/actions/setup - run: ./gradlew clean test lint --continue --console=plain --max-workers=3 - uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # pin@5.5.3 ================================================ FILE: .gitignore ================================================ # Created by https://www.gitignore.io/api/intellij,android,osx,windows ### Intellij ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm *.iml ## Directory-based project format: .idea/ # if you remove the above rule, at least ignore the following: # User-specific stuff: # .idea/workspace.xml # .idea/tasks.xml # .idea/dictionaries # .idea/shelf # Sensitive or high-churn files: # .idea/dataSources.ids # .idea/dataSources.xml # .idea/sqlDataSources.xml # .idea/dynamic.xml # .idea/uiDesigner.xml # Gradle: # .idea/gradle.xml # .idea/libraries # Mongo Explorer plugin: # .idea/mongoSettings.xml ## File-based project format: *.ipr *.iws ## Plugin-specific files: # IntelliJ /out/ # mpeltonen/sbt-idea plugin .idea_modules/ # JIRA plugin atlassian-ide-plugin.xml # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties ### Android ### # Built application files *.apk *.ap_ # Files for the Dalvik VM *.dex # Java class files *.class # Generated files bin/ gen/ # Gradle files .gradle/ build/ # Local configuration file (sdk path, etc) local.properties # Log Files *.log # Android Studio Navigation editor temp files .navigation/ # Android Studio captures folder captures/ ### Android Patch ### gen-external-apklibs ### OSX ### .DS_Store # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes ================================================ FILE: .shiprc ================================================ { "files": { "auth0/build.gradle": [], ".version": [], "README.md": [] }, "prefixVersion": false } ================================================ FILE: .version ================================================ 3.2.2 ================================================ FILE: CHANGELOG.md ================================================ # Change Log ## [3.2.1](https://github.com/auth0/Lock.Android/tree/3.2.2) (2023-01-11) [Full Changelog](https://github.com/auth0/Lock.Android/compare/3.2.1...3.2.2) This patch release does not contain any functional changes, but is being released using an updated signing key for verification as part of our commitment to best security practices. Please review [the README note for additional details.](https://github.com/auth0/Lock.Android/blob/main/README.md) **Security** - Bump Auth0.Android dependency to 2.8.1 [\#652](https://github.com/auth0/Lock.Android/pull/652) ([poovamraj](https://github.com/poovamraj)) ## [3.2.1](https://github.com/auth0/Lock.Android/tree/3.2.1) (2022-06-24) [Full Changelog](https://github.com/auth0/Lock.Android/compare/3.2.0...3.2.1) **Fixed** - Fixing bug where custom audience was not being set in [\#645](https://github.com/auth0/Lock.Android/pull/645) ([Blake-Carrier](https://github.com/Blake-Carrier)) **Security** - Bump GSON dependency to 2.8.9 [\#639](https://github.com/auth0/Lock.Android/pull/639) ([evansims](https://github.com/evansims)) ## [3.2.0](https://github.com/auth0/Lock.Android/tree/3.2.0) (2021-10-11) [Full Changelog](https://github.com/auth0/Lock.Android/compare/3.1.0...3.2.0) **Changed** - update dependencies and sdk [\#636](https://github.com/auth0/Lock.Android/pull/636) ([lbalmaceda](https://github.com/lbalmaceda)) ## [3.1.0](https://github.com/auth0/Lock.Android/tree/3.1.0) (2021-07-20) [Full Changelog](https://github.com/auth0/Lock.Android/compare/3.0.0...3.1.0) **Added** - Add support for OOB multi-factor authentication [\#632](https://github.com/auth0/Lock.Android/pull/632) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Update AndroidManifest.xml for Android 12 support [\#631](https://github.com/auth0/Lock.Android/pull/631) ([VincentJoshuaET](https://github.com/VincentJoshuaET)) ## [3.0.1](https://github.com/auth0/Lock.Android/tree/3.0.1) (2021-05-27) [Full Changelog](https://github.com/auth0/Lock.Android/compare/3.0.0...3.0.1) **Fixed** - Trim username and email input to avoid NPE [\#628](https://github.com/auth0/Lock.Android/pull/628) ([lbalmaceda](https://github.com/lbalmaceda)) ## [3.0.0](https://github.com/auth0/Lock.Android/tree/3.0.0) (2021-05-04) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.23.0...3.0.0) **Closed issues** - AuthenticationCallback methods are only called the first time I login [\#607](https://github.com/auth0/Lock.Android/issues/607) - UnauthorizedErrors are not received in lock widget callbacks [\#606](https://github.com/auth0/Lock.Android/issues/606) **Added** - Add migration guide [SDK-2430] [\#615](https://github.com/auth0/Lock.Android/pull/615) ([lbalmaceda](https://github.com/lbalmaceda)) **Changed** - Drop Jetifier plugin usage [\#624](https://github.com/auth0/Lock.Android/pull/624) ([lbalmaceda](https://github.com/lbalmaceda)) - Enable AppLinks in the declared intent filters [\#622](https://github.com/auth0/Lock.Android/pull/622) ([lbalmaceda](https://github.com/lbalmaceda)) - Simplify library set up by declaring activities internally [\#620](https://github.com/auth0/Lock.Android/pull/620) ([lbalmaceda](https://github.com/lbalmaceda)) - Refactor broadcast receiver usage [\#619](https://github.com/auth0/Lock.Android/pull/619) ([lbalmaceda](https://github.com/lbalmaceda)) - Raise Unauthorized and Access Denied errors through callback [SDK-2480] [\#618](https://github.com/auth0/Lock.Android/pull/618) ([lbalmaceda](https://github.com/lbalmaceda)) - Update readme [\#617](https://github.com/auth0/Lock.Android/pull/617) ([lbalmaceda](https://github.com/lbalmaceda)) - Migrate sample app to use Kotlin [SDK-2431] [\#616](https://github.com/auth0/Lock.Android/pull/616) ([lbalmaceda](https://github.com/lbalmaceda)) **Removed** - Remove support for changing the Social Button style [SDK-2430] [\#614](https://github.com/auth0/Lock.Android/pull/614) ([lbalmaceda](https://github.com/lbalmaceda)) - Remove support for Implicit Authentication flow [SDK-2430] [\#613](https://github.com/auth0/Lock.Android/pull/613) ([lbalmaceda](https://github.com/lbalmaceda)) - Remove WebView component support [SDK-2430] [\#612](https://github.com/auth0/Lock.Android/pull/612) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Fix filtering by Country name [SDK-2546] [\#623](https://github.com/auth0/Lock.Android/pull/623) ([lbalmaceda](https://github.com/lbalmaceda)) - Run lint and fix inspection results [\#611](https://github.com/auth0/Lock.Android/pull/611) ([lbalmaceda](https://github.com/lbalmaceda)) **Breaking changes** - Update LockCallback and AuthenticationCallback [SDK-2480] [\#621](https://github.com/auth0/Lock.Android/pull/621) ([lbalmaceda](https://github.com/lbalmaceda)) - Use Auth0.Android v2 [SDK-2429] [\#610](https://github.com/auth0/Lock.Android/pull/610) ([lbalmaceda](https://github.com/lbalmaceda)) - Migrate to AndroidX [\#609](https://github.com/auth0/Lock.Android/pull/609) ([lbalmaceda](https://github.com/lbalmaceda)) - Bump the minimum required android version [SDK-2427] [\#608](https://github.com/auth0/Lock.Android/pull/608) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.23.0](https://github.com/auth0/Lock.Android/tree/2.23.0) (2020-09-14) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.22.0...2.23.0) **Having project sync issues after upgrading?** This release updates the core SDK to make it compatible with Android 11 new privacy changes. If you run into a build compile issue when importing this version, make sure that you are using the latest patch version of the Android Gradle Plugin. Check the table in the [announcement blogpost](https://android-developers.googleblog.com/2020/07/preparing-your-build-for-package-visibility-in-android-11.html) to learn to what version you should update. **Changed** - Improve compatibility with Kotlin and run Lint on CI [\#596](https://github.com/auth0/Lock.Android/pull/596) ([lbalmaceda](https://github.com/lbalmaceda)) - Add compatibility with Android 11: Bump SDK version [\#595](https://github.com/auth0/Lock.Android/pull/595) ([lbalmaceda](https://github.com/lbalmaceda)) - Update "37 Signals" auth style to "Basecamp" [SDK-1944] [\#593](https://github.com/auth0/Lock.Android/pull/593) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.22.0](https://github.com/auth0/Lock.Android/tree/2.22.0) (2020-08-25) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.21.1...2.22.0) **Added** - Support bot protection [\#589](https://github.com/auth0/Lock.Android/pull/589) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.21.1](https://github.com/auth0/Lock.Android/tree/2.21.1) (2020-08-05) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.21.0...2.21.1) **Fixed** - Use latest SDK patch [\#587](https://github.com/auth0/Lock.Android/pull/587) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.21.0](https://github.com/auth0/Lock.Android/tree/2.21.0) (2020-07-20) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.20.0...2.21.0) ### Read if using the SecureCredentialsManager Starting from this version, the alias used to store the key pair in the Android Keystore is prefixed to avoid collisions between other Auth0 enabled apps. Your users will be facing a "credentials not found" scenario, requiring them to log in again **once**. Double check that you are not ignoring the errors being returned in the callback and documented [here](https://github.com/auth0/Auth0.Android#handling-exceptions). **Changed** - Bump SDK to version 1.24.0 [\#583](https://github.com/auth0/Lock.Android/pull/583) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Bugfix #581 | Fix social login buttons with white backgrounds [\#582](https://github.com/auth0/Lock.Android/pull/582) ([morganlutz](https://github.com/morganlutz)) ## [2.20.0](https://github.com/auth0/Lock.Android/tree/2.20.0) (2020-05-26) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.19.0...2.20.0) **Added** - Allow to change the visible sign-up fields threshold [\#578](https://github.com/auth0/Lock.Android/pull/578) ([lbalmaceda](https://github.com/lbalmaceda)) - Add social button style for Sign In with Apple [\#575](https://github.com/auth0/Lock.Android/pull/575) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Fix ModeSelectionView sync issue [\#577](https://github.com/auth0/Lock.Android/pull/577) ([lbalmaceda](https://github.com/lbalmaceda)) - Center Custom Fields additional form vertically [\#576](https://github.com/auth0/Lock.Android/pull/576) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.19.0](https://github.com/auth0/Lock.Android/tree/2.19.0) (2020-04-29) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.18.0...2.19.0) **Changed** - Bump the SDK version to 1.23.0 [\#570](https://github.com/auth0/Lock.Android/pull/570) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Fixed material library 1.1.0 tab layout height issue [\#568](https://github.com/auth0/Lock.Android/pull/568) ([ivabra](https://github.com/ivabra)) ## [2.18.0](https://github.com/auth0/Lock.Android/tree/2.18.0) (2020-03-04) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.17.1...2.18.0) **Changed** - Update Social Button style [\#563](https://github.com/auth0/Lock.Android/pull/563) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.17.1](https://github.com/auth0/Lock.Android/tree/2.17.1) (2020-01-10) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.17.0...2.17.1) **Fixed** - Bump SDK version and OSS plugin version [\#560](https://github.com/auth0/Lock.Android/pull/560) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.17.0](https://github.com/auth0/Lock.Android/tree/2.17.0) (2019-12-26) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.16.0...2.17.0) **Added** - Improve OIDC Compliance and support new Passwordless [\#558](https://github.com/auth0/Lock.Android/pull/558) ([lbalmaceda](https://github.com/lbalmaceda)) **Security** - Improve OIDC Compliance and support new Passwordless [\#558](https://github.com/auth0/Lock.Android/pull/558) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.16.0](https://github.com/auth0/Lock.Android/tree/2.16.0) (2019-10-24) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.15.0...2.16.0) **Added** - Add hidden extra sign up fields [\#552](https://github.com/auth0/Lock.Android/pull/552) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.15.0](https://github.com/auth0/Lock.Android/tree/2.15.0) (2019-07-26) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.14.1...2.15.0) **Added** - Add Root Attributes on sign up or user creation [\#543](https://github.com/auth0/Lock.Android/pull/543) ([lbalmaceda](https://github.com/lbalmaceda)) **Changed** - Update username regex to allow special chars [\#544](https://github.com/auth0/Lock.Android/pull/544) ([lbalmaceda](https://github.com/lbalmaceda)) - Use latest Android Gradle plugin version [\#542](https://github.com/auth0/Lock.Android/pull/542) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Fix typo in password reset string [\#541](https://github.com/auth0/Lock.Android/pull/541) ([horsejockey](https://github.com/horsejockey)) - Avoid registering multiple broadcast receiver instances [\#539](https://github.com/auth0/Lock.Android/pull/539) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.14.1](https://github.com/auth0/Lock.Android/tree/2.14.1) (2019-06-06) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.14.0...2.14.1) **Fixed** - Remove entirely the small social button style [\#537](https://github.com/auth0/Lock.Android/pull/537) ([lbalmaceda](https://github.com/lbalmaceda)) - Define custom email regex to validate emails [\#534](https://github.com/auth0/Lock.Android/pull/534) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.14.0](https://github.com/auth0/Lock.Android/tree/2.14.0) (2019-04-30) From this release on, the option to display social connections in small styled buttons is no longer available due to branding compliance reasons. All the social connections will now be displayed as large styled buttons. [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.13.0...2.14.0) **Changed** - Remove "Small" social button style [\#529](https://github.com/auth0/Lock.Android/pull/529) ([lbalmaceda](https://github.com/lbalmaceda)) - Update google-oauth2 strategy logo [\#528](https://github.com/auth0/Lock.Android/pull/528) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.13.0](https://github.com/auth0/Lock.Android/tree/2.13.0) (2019-04-17) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.12.1...2.13.0) **Changed** - Use auth0.android 1.15.2 [\#526](https://github.com/auth0/Lock.Android/pull/526) ([lbalmaceda](https://github.com/lbalmaceda)) - Update facebook icon to comply with new branding [\#525](https://github.com/auth0/Lock.Android/pull/525) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.12.1](https://github.com/auth0/Lock.Android/tree/2.12.1) (2019-02-22) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.12.0...2.12.1) **Fixed** - Parse 'password_leaked' error message [\#522](https://github.com/auth0/Lock.Android/pull/522) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.12.0](https://github.com/auth0/Lock.Android/tree/2.12.0) (2019-01-30) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.11.0...2.12.0) **Changed** - Use latest Auth0.Android SDK [\#520](https://github.com/auth0/Lock.Android/pull/520) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.11.1](https://github.com/auth0/Lock.Android/tree/2.11.1) (2018-10-16) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.11.0...2.11.1) **Fixed** - Handle Tab change manually on ModeSelectionView [\#499](https://github.com/auth0/Lock.Android/pull/499) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.11.0](https://github.com/auth0/Lock.Android/tree/2.11.0) (2018-10-05) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.10.0...2.11.0) **Added** - Added showTerms feature flag [\#487](https://github.com/auth0/Lock.Android/pull/487) ([cocojoe](https://github.com/cocojoe)) **Fixed** - Use target SDK 28 and latest Auth0 SDK version [\#484](https://github.com/auth0/Lock.Android/pull/484) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.10.0](https://github.com/auth0/Lock.Android/tree/2.10.0) (2018-09-14) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.9.0...2.10.0) **Added** - Allow to override the password minimum length [\#474](https://github.com/auth0/Lock.Android/pull/474) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.9.0](https://github.com/auth0/Lock.Android/tree/2.9.0) (2018-07-25) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.8.6...2.9.0) **Added** - Allow to disable 'ActiveAuth' on enterprise Connections [\#471](https://github.com/auth0/Lock.Android/pull/471) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.8.6](https://github.com/auth0/Lock.Android/tree/2.8.6) (2018-07-20) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.8.5...2.8.6) **Fixed** - Fix CustomTabsController issues [\#469](https://github.com/auth0/Lock.Android/pull/469) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.8.5](https://github.com/auth0/Lock.Android/tree/2.8.5) (2018-07-19) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.8.4...2.8.5) **Fixed** - Enable MFA support for OIDC conformant clients [\#451](https://github.com/auth0/Lock.Android/pull/451) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.8.4](https://github.com/auth0/Lock.Android/tree/2.8.4) (2018-07-13) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.8.3...2.8.4) **Fixed** - Fix WebAuth issues by updating SDK to 1.13.1 [\#465](https://github.com/auth0/Lock.Android/pull/465) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.8.3](https://github.com/auth0/Lock.Android/tree/2.8.3) (2018-03-19) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.8.2...2.8.3) **Fixed** - Disable HTTP 2 protocol [\#458](https://github.com/auth0/Lock.Android/pull/458) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.8.2](https://github.com/auth0/Lock.Android/tree/2.8.2) (2018-02-26) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.8.1...2.8.2) **Fixed** - Draw background and borders on programmatically created fields [\#455](https://github.com/auth0/Lock.Android/pull/455) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.8.1](https://github.com/auth0/Lock.Android/tree/2.8.1) (2018-02-21) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.8.0...2.8.1) **Changed** - Bump SDK version to 1.12.1 [\#452](https://github.com/auth0/Lock.Android/pull/452) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.8.0](https://github.com/auth0/Lock.Android/tree/2.8.0) (2017-10-19) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.7.0...2.8.0) **Closed issues** - Cannot navigate social login buttons using gamepad on Android TV [\#443](https://github.com/auth0/Lock.Android/issues/443) **Added** - Add RTL support [\#445](https://github.com/auth0/Lock.Android/pull/445) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Fix ValidatedInputView border color on focus change [\#446](https://github.com/auth0/Lock.Android/pull/446) ([lbalmaceda](https://github.com/lbalmaceda)) - Fix non touchscreen navigation [\#444](https://github.com/auth0/Lock.Android/pull/444) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.7.0](https://github.com/auth0/Lock.Android/tree/2.7.0) (2017-07-19) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.6.0...2.7.0) **Changed** - Update lib version to use auth0Scheme placeholder [\#431](https://github.com/auth0/Lock.Android/pull/431) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.6.0](https://github.com/auth0/Lock.Android/tree/2.6.0) (2017-07-12) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.5.0...2.6.0) **Closed issues** - NullPointerException in onResume for certain devices [\#415](https://github.com/auth0/Lock.Android/issues/415) **Added** - Add Password Toggle enabler/disabler [\#423](https://github.com/auth0/Lock.Android/pull/423) ([lbalmaceda](https://github.com/lbalmaceda)) - Add Hosted Login Page button to the demo. [\#422](https://github.com/auth0/Lock.Android/pull/422) ([lbalmaceda](https://github.com/lbalmaceda)) - Add "show password" button for Password fields. [\#421](https://github.com/auth0/Lock.Android/pull/421) ([lbalmaceda](https://github.com/lbalmaceda)) **Changed** - Change activity to context in Lock initialization [\#416](https://github.com/auth0/Lock.Android/pull/416) ([skrabacz-michal](https://github.com/skrabacz-michal)) **Fixed** - Fix NPE when enabling or disabling Lock interaction [\#420](https://github.com/auth0/Lock.Android/pull/420) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.5.0](https://github.com/auth0/Lock.Android/tree/2.5.0) (2017-04-27) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.4.0...2.5.0) **Added** - Add paypal-sandbox support [\#412](https://github.com/auth0/Lock.Android/pull/412) ([ziluvatar](https://github.com/ziluvatar)) - Send login_hint on enterprise web auth when username/email is available [\#410](https://github.com/auth0/Lock.Android/pull/410) ([lbalmaceda](https://github.com/lbalmaceda)) - Add screens for Lock loading errors [\#407](https://github.com/auth0/Lock.Android/pull/407) ([lbalmaceda](https://github.com/lbalmaceda)) **Changed** - Allow to customize the capitalization of messages [\#408](https://github.com/auth0/Lock.Android/pull/408) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.4.0](https://github.com/auth0/Lock.Android/tree/2.4.0) (2017-03-06) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.3.0...2.4.0) **Closed issues** - LockBuilder withScope method not working. [\#397](https://github.com/auth0/Lock.Android/issues/397) **Added** - Add Passwordless auto login [\#392](https://github.com/auth0/Lock.Android/pull/392) ([lbalmaceda](https://github.com/lbalmaceda)) **Changed** - Update auth0.android library to version 1.6.0 [\#400](https://github.com/auth0/Lock.Android/pull/400) ([lbalmaceda](https://github.com/lbalmaceda)) - Remove "invalid client type" user message [\#391](https://github.com/auth0/Lock.Android/pull/391) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Fix setScope to properly send the scope attribute on Auth [\#399](https://github.com/auth0/Lock.Android/pull/399) ([lbalmaceda](https://github.com/lbalmaceda)) - Add loggingEnabled flag to the Auth0 parcel [\#398](https://github.com/auth0/Lock.Android/pull/398) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.3.0](https://github.com/auth0/Lock.Android/tree/2.3.0) (2017-01-02) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.2.1...2.3.0) **Added** - Send custom audience on login/signIn if is OIDC conformant [\#387](https://github.com/auth0/Lock.Android/pull/387) ([lbalmaceda](https://github.com/lbalmaceda)) - Include updated Proguard rules in the packaged aar [\#385](https://github.com/auth0/Lock.Android/pull/385) ([lbalmaceda](https://github.com/lbalmaceda)) - Support custom audience for Web Authentication [\#383](https://github.com/auth0/Lock.Android/pull/383) ([lbalmaceda](https://github.com/lbalmaceda)) - Support custom schemes for Web Authentication [\#382](https://github.com/auth0/Lock.Android/pull/382) ([lbalmaceda](https://github.com/lbalmaceda)) - Add option to hide Header Title on the Main screen [\#381](https://github.com/auth0/Lock.Android/pull/381) ([lbalmaceda](https://github.com/lbalmaceda)) **Changed** - Update gradle plugins and google dependencies [\#389](https://github.com/auth0/Lock.Android/pull/389) ([hzalaz](https://github.com/hzalaz)) - Use Header style and fix Submit button height when label is displayed [\#388](https://github.com/auth0/Lock.Android/pull/388) ([lbalmaceda](https://github.com/lbalmaceda)) **Deprecated** - Deprecate useImplicitGrant method [\#372](https://github.com/auth0/Lock.Android/pull/372) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Fix Auth0 parcel that was losing telemetry and OIDC flag [\#384](https://github.com/auth0/Lock.Android/pull/384) ([lbalmaceda](https://github.com/lbalmaceda)) - Fix wrong label setting if login was disabled and pwd reset was first screen [\#380](https://github.com/auth0/Lock.Android/pull/380) ([lbalmaceda](https://github.com/lbalmaceda)) - Don't return to login/signup screen after pwd reset if those screens are disabled [\#379](https://github.com/auth0/Lock.Android/pull/379) ([lbalmaceda](https://github.com/lbalmaceda)) - Add authentication parameters to custom AuthProvider [\#375](https://github.com/auth0/Lock.Android/pull/375) ([lbalmaceda](https://github.com/lbalmaceda)) - Avoid sending authentication parameters on password-reset [\#373](https://github.com/auth0/Lock.Android/pull/373) ([lbalmaceda](https://github.com/lbalmaceda)) **Breaking changes** - Use labeled submit button by default and separate signUp/logIn strings [\#386](https://github.com/auth0/Lock.Android/pull/386) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.2.1](https://github.com/auth0/Lock.Android/tree/2.2.1) (2016-11-22) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.2.0...2.2.1) **Changed** - Update auth0.android to fix scope issue [\#370](https://github.com/auth0/Lock.Android/pull/370) ([hzalaz](https://github.com/hzalaz)) ## [2.2.0](https://github.com/auth0/Lock.Android/tree/2.2.0) (2016-11-21) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.1.1...2.2.0) **Added** - Allow to set a custom scope. [\#368](https://github.com/auth0/Lock.Android/pull/368) ([lbalmaceda](https://github.com/lbalmaceda)) **Changed** - Update to auth0.android 1.1.1 [\#369](https://github.com/auth0/Lock.Android/pull/369) ([hzalaz](https://github.com/hzalaz)) ## [2.1.1](https://github.com/auth0/Lock.Android/tree/2.1.1) (2016-11-02) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.1.0...2.1.1) **Fixed** - Fix NPE when connection scope is missing [\#365](https://github.com/auth0/Lock.Android/pull/365) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.1.0](https://github.com/auth0/Lock.Android/tree/2.1.0) (2016-10-24) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.0.0...2.1.0) **Added** - Support connection_scope for OAuth Connections [\#361](https://github.com/auth0/Lock.Android/pull/361) ([lbalmaceda](https://github.com/lbalmaceda)) - Send LockException if the Theme is invalid [\#358](https://github.com/auth0/Lock.Android/pull/358) ([lbalmaceda](https://github.com/lbalmaceda)) - Add labeled submit button option [\#352](https://github.com/auth0/Lock.Android/pull/352) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Non-empty username validation for custom/imported connections [\#360](https://github.com/auth0/Lock.Android/pull/360) ([lbalmaceda](https://github.com/lbalmaceda)) - Fix Theme load from styles.xml [\#357](https://github.com/auth0/Lock.Android/pull/357) ([lbalmaceda](https://github.com/lbalmaceda)) **Breaking changes** - Use browser by default when using WebAuthProvider. [\#355](https://github.com/auth0/Lock.Android/pull/355) ([lbalmaceda](https://github.com/lbalmaceda)) Since Google will be [blocking webview OAuth request](https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html) we switched the default authentication flow for all social connections from WebView to Browser. Browser authentication requires a little more configuration in your `AndroidManifest.xml` file. First make sure `LockActivity` has `singleTask` in `android:launchMode` and then add to it an `intent-filter`: ```xml ``` ## [2.0.0](https://github.com/auth0/Lock.Android/tree/2.0.0) (2016-09-21) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.0.0-beta.4...2.0.0) **Changed** - Merge Enterprise and Social login events [\#347](https://github.com/auth0/Lock.Android/pull/347) ([lbalmaceda](https://github.com/lbalmaceda)) - Show button when only one enterprise connection is available [\#341](https://github.com/auth0/Lock.Android/pull/341) ([lbalmaceda](https://github.com/lbalmaceda)) - Filter social strategies by connection name [\#340](https://github.com/auth0/Lock.Android/pull/340) ([lbalmaceda](https://github.com/lbalmaceda)) - Flatten Strategies into Connections [\#335](https://github.com/auth0/Lock.Android/pull/335) ([lbalmaceda](https://github.com/lbalmaceda)) **Fixed** - Fix OAuth connection callback for PasswordlessActivity [\#346](https://github.com/auth0/Lock.Android/pull/346) ([lbalmaceda](https://github.com/lbalmaceda)) - Fix non ro-enabled enterprise connections flow. [\#344](https://github.com/auth0/Lock.Android/pull/344) ([lbalmaceda](https://github.com/lbalmaceda)) - Fix wrong telemetry version [\#342](https://github.com/auth0/Lock.Android/pull/342) ([lbalmaceda](https://github.com/lbalmaceda)) **Breaking changes** - [Breaking Change] Rename builder methods [\#350](https://github.com/auth0/Lock.Android/pull/350) ([lbalmaceda](https://github.com/lbalmaceda)) - Refactor AuthProviderResolver [Breaking Change][\#333](https://github.com/auth0/Lock.Android/pull/333) ([lbalmaceda](https://github.com/lbalmaceda)) ## [2.0.0-beta.4](https://github.com/auth0/Lock.Android/tree/2.0.0-beta.4) (2016-08-24) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.0.0-beta.3...2.0.0-beta.4) **Closed issues** - Lock SSO Username Fails Validation [\#332](https://github.com/auth0/Lock.Android/issues/332) **Fixed** - Change username validation for SSO connections [\#334](https://github.com/auth0/Lock.Android/pull/334) ([lbalmaceda](https://github.com/lbalmaceda)) - Check that requested tokens are present on the result. [\#330](https://github.com/auth0/Lock.Android/pull/330) ([lbalmaceda](https://github.com/lbalmaceda)) - Use first available connection name when authenticating with OAuth [\#320](https://github.com/auth0/Lock.Android/pull/320) ([lbalmaceda](https://github.com/lbalmaceda)) **Added** - Custom Style for Social Buttons [\#325](https://github.com/auth0/Lock.Android/pull/325) ([lbalmaceda](https://github.com/lbalmaceda)) - Request the user to accept Terms&Policy before Sign Up [\#319](https://github.com/auth0/Lock.Android/pull/319) ([lbalmaceda](https://github.com/lbalmaceda)) - Handle too_many_attempts API error [\#308](https://github.com/auth0/Lock.Android/pull/308) ([lbalmaceda](https://github.com/lbalmaceda)) - Add Service Terms and Privacy Policy dialog [\#307](https://github.com/auth0/Lock.Android/pull/307) ([lbalmaceda](https://github.com/lbalmaceda)) **Changed** - Force init lock [Breaking Change][\#329](https://github.com/auth0/Lock.Android/pull/329) ([lbalmaceda](https://github.com/lbalmaceda)) - Update Auth0 lib version to latest [\#327](https://github.com/auth0/Lock.Android/pull/327) ([lbalmaceda](https://github.com/lbalmaceda)) - Hide Theme configuration on the Builder [Breaking Change][\#326](https://github.com/auth0/Lock.Android/pull/326) ([lbalmaceda](https://github.com/lbalmaceda)) - Use AuthMode constants when notifying tab change [\#323](https://github.com/auth0/Lock.Android/pull/323) ([lbalmaceda](https://github.com/lbalmaceda)) - Handle wrong Client Type error [\#321](https://github.com/auth0/Lock.Android/pull/321) ([lbalmaceda](https://github.com/lbalmaceda)) - Change SocialButton title when changing the Form mode [\#317](https://github.com/auth0/Lock.Android/pull/317) ([lbalmaceda](https://github.com/lbalmaceda)) - UI Improvements: Bigger buttons/fields [\#314](https://github.com/auth0/Lock.Android/pull/314) ([lbalmaceda](https://github.com/lbalmaceda)) - New Tab design. [\#313](https://github.com/auth0/Lock.Android/pull/313) ([lbalmaceda](https://github.com/lbalmaceda)) - Use pngs instead of vectorial xml files [\#311](https://github.com/auth0/Lock.Android/pull/311) ([lbalmaceda](https://github.com/lbalmaceda)) - Make PKCE enabled by default [\#310](https://github.com/auth0/Lock.Android/pull/310) ([lbalmaceda](https://github.com/lbalmaceda)) - Always pick defaultDbConnection if available [\#309](https://github.com/auth0/Lock.Android/pull/309) ([lbalmaceda](https://github.com/lbalmaceda)) **Breaking changes** `Lock` & `PassworlessLock` no longer has the method `onCreate(Activity)` and it's logic is now part of the method `Lock.Builder.build(Activity)`. So to create a Lock instance you will have ```java Lock lock = Lock.newBuilder(auth0, callback) //Customize Lock .build(this); ``` Also now you can create `Lock` by reading your Auth0 account credentials from a strings file ```java Lock lock = Lock.newBuilder(callback) //Customize Lock .build(this); ``` and he string file should have ```xml {CLIENT_ID} {DOMAIN} ``` `Lock.Builder` no longers allow to customize Lock's theme using the method `withTheme(Theme)` since using Android themes is preferable. Also for all non-database authentication will use **Proof Key for Code Exchange** by default so your client type in Auth0 dashboard **must** be `Native`. ## [2.0.0-beta.3](https://github.com/auth0/Lock.Android/tree/2.0.0-beta.3) (2016-07-22) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.0.0-beta.2...2.0.0-beta.3) **Added** - Locally Configurable Lock sample app [\#298](https://github.com/auth0/Lock.Android/pull/298) ([lbalmaceda](https://github.com/lbalmaceda) - Password Strength Widget [\#297](https://github.com/auth0/Lock.Android/pull/297) ([lbalmaceda](https://github.com/lbalmaceda) **Changed** - Update Proguard rules [\#305](https://github.com/auth0/Lock.Android/pull/305) ([lbalmaceda](https://github.com/lbalmaceda) - Remove Fullscreen feature [\#302](https://github.com/auth0/Lock.Android/pull/302) ([lbalmaceda](https://github.com/lbalmaceda) - Add callback setup on dashboard [\#300](https://github.com/auth0/Lock.Android/pull/300) ([lbalmaceda](https://github.com/lbalmaceda) - Allow to customize Lock's theme programmatically [\#294](https://github.com/auth0/Lock.Android/pull/294) ([lbalmaceda](https://github.com/lbalmaceda) - Remove unused User Profile calls. [\#293](https://github.com/auth0/Lock.Android/pull/293) ([lbalmaceda](https://github.com/lbalmaceda) - Take email input across the forms [\#292](https://github.com/auth0/Lock.Android/pull/292) ([lbalmaceda](https://github.com/lbalmaceda) - Allow up to 3 Social Big Buttons on Passwordless mode [\#291](https://github.com/auth0/Lock.Android/pull/291) ([lbalmaceda](https://github.com/lbalmaceda) - Improve Custom Fields flow and layout [\#290](https://github.com/auth0/Lock.Android/pull/290) ([lbalmaceda](https://github.com/lbalmaceda) - Handle Application without Connections [\#289](https://github.com/auth0/Lock.Android/pull/289) ([lbalmaceda](https://github.com/lbalmaceda) - Draw the header behind the statusBar in Lollipop or greater [\#288](https://github.com/auth0/Lock.Android/pull/288) ([lbalmaceda](https://github.com/lbalmaceda) **Fixed** - Fix sign up request not sending the user metadata [\#303](https://github.com/auth0/Lock.Android/pull/303) ([lbalmaceda](https://github.com/lbalmaceda) - Fix TextView extra padding. [\#296](https://github.com/auth0/Lock.Android/pull/296) ([lbalmaceda](https://github.com/lbalmaceda) - Country code selection widget fixes [\#295](https://github.com/auth0/Lock.Android/pull/295) ([lbalmaceda](https://github.com/lbalmaceda) **Breaking changes** **Lock** `Builder` method ```java public Builder allowSignIn(boolean allow) {...} ``` was renamed to ```java public Builder allowLogIn(boolean allow) {...} ``` Also this method (and feature) is no longer supported in **Lock** ```java public Builder fullscreen(boolean fullscreen) {...} ``` ## [2.0.0-beta.2](https://github.com/auth0/Lock.Android/tree/2.0.0-beta.2) (2016-06-06) [Full Changelog](https://github.com/auth0/Lock.Android/compare/2.0.0-beta.1...2.0.0-beta.2) **Changed** - Use new version of auth0-java to fix issue with json parsing [\#286](https://github.com/auth0/Lock.Android/pull/286) ([lbalmaceda](https://github.com/lbalmaceda)) - Fix issues with default values of `allow****` and `initialScreen` options [\#286](https://github.com/auth0/Lock.Android/pull/286) ([lbalmaceda](https://github.com/lbalmaceda)) **Breaking changes** `AuthenticationCallback` no longer returns `UserProfile`, it only returns `Credentials` object with the tokens of the authenticated user: ```java private LockCallback callback = new AuthenticationCallback() { @Override public void onAuthentication(Credentials credentials) { //Authenticated } @Override public void onCanceled() { //User pressed back } @Override public void onError(LockException error) //Exception occurred } }; ``` To request the `UserProfile`, just use `AuthenticationAPIClient` from [auth0-java](https://github.com/auth0/auth0-java) ```java @Override public void onAuthentication(Credentials credentials) { AuthenticationAPIClient client = new AuthenticationAPIClient(new Auth0("YOUR_CLIENT_ID", "YOUR_DOMAIN")); client.tokenInfo(credentials.idToken) .start(new BaseCallback() { @Override public void onSuccess(UserProfile payload) { } @Override public void onFailure(Auth0Exception error) { } }); } ``` ## [2.0.0-beta.1](https://github.com/auth0/Lock.Android/tree/2.0.0-beta.1) (2016-06-03) First beta release of Lock for Android v2 ### Declaration in AndroidManifest.xml Now Lock for Android requires these permisssions ```xml ``` and this is how `LockActivity` should be declared in your Android Manifest ```xml ``` ### Lock instance In the previous version of **Lock**, you were asked to create a custom `Application` class and initialize the `Lock.Context` there. Now this is no longer needed. To create a new `Lock` instance and configure it, use the `Lock.Builder` class. #### Auth0 Create an `Auth0` instance to hold your account details, which are the `AUTH0_CLIENT_ID` and the `AUTH0_DOMAIN`. ```java Auth0 auth0 = new Auth0("YOUR_AUTH0_CLIENT_ID", "YOUR_AUTH0_DOMAIN"); ``` ### Authentication Callback You'll also need a `LockCallback` implementation, we provide `AuthenticationCallback` that reports the following events: - onAuthentication: User successfuly authenticated - onError: An unrecoverable error ocurred during authentication - onCanceled: User pressed back (if closable is true) > If you need a more fine grained control you can implement `LockCallback` full interface. ```java private LockCallback callback = new AuthenticationCallback() { @Override public void onAuthentication(Authentication authentication) { //Authenticated } @Override public void onCanceled() { //User pressed back } @Override public void onError(LockException error) //Exception occurred } }; ``` ### Lock.Builder Call the static method `Lock.newBuilder(Auth0, AuthenticationCallback)` passing the account details and the callback implementation, and start configuring the [Options](#options). After you're done, build the `Lock` instance and use it to start the `LockActivity`. This is how your activity should look like. ```java public class MainActivity extends Activity { private Lock lock; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { Auth0 auth0 = new Auth0(AUTH0_CLIENT_ID, AUTH0_DOMAIN); lock = Lock.newBuilder(auth0, callback) // ... Options .build(); lock.onCreate(this); } @Override public void onDestroy() { lock.onDestroy(this); super.onDestroy(); } private void performLogin(boolean useBrowser) { startActivity(lock.newIntent(this)); } private LockCallback callback = new AuthenticationCallback() { @Override public void onAuthentication(Authentication authentication) { //Authenticated } @Override public void onCanceled() { //User pressed back } @Override public void onError(LockException error) { //Exception occurred } }; } ``` > Remember to notify the `LockActivity` on every `OnCreate` and `OnDestroy` call on your Activity, as it helps to keep the Lock state. ### Options As in the previous version, `Lock` can be configured with extra options. Check below if the behavior changed or if they only got renamed. #### Renamed options from v1 - shouldUseEmail: Renamed to `withUsernameStyle`. Defines if it should ask for email only, username only, or both of them. By default, it'll respect the Dashboard configuration of the parameter `requires_username`. - isClosable: Renamed to `closable`. Defines if the LockActivity can be closed. By default, it's not closable. - setFullscreen: Renamed to `fullscreen`. Defines if the LockActivity it's displayed in fullscreen. By default, it's not fullscreen. - shouldLoginAfterSignUp: Renamed to `loginAfterSignUp`. Whether after a SignUp the user should be logged in automatically. - disableSignupAction: Renamed to `allowSignUp`. Shows the Sign Up form if a Database connection is configured. - disableResetAction: Renamed to `allowForgotPassword`. Shows a link to the Forgot Password form if a Database connection is configured and it's allowed from the Dashboard. - defaultUserPasswordConnection: Renamed to `setDefaultDatabaseConnection`. Defines which will be the default Database connection. This is useful if your application has many Database connections configured. - setConnections: Renamed to `onlyUseConnections`. Filters the allowed connections from the list configured in the Dashboard.. - setAuthenticationParameters: Renamed to `withAuthenticationParameters`. Defines extra authentication parameters, sent on sign up and log in/sign in. #### New options in v2 - `initialScreen(int)` allows to customize which form will show first when launching **Lock**. The possibles values are LOG_IN, SIGN_UP, and FORGOT_PASSWORD. By default LOG_IN is the initial screen. - `allowLogIn(boolean)` shows the Log In form if a Database connection is configured. By default, this screen it's enabled. - `allowSignUp(boolean)` shows the Sign Up form if a Database connection is configured. By default, this screen it's enabled. - `allowForgotPassword(boolean)` shows the Forgot Password form if a Database connection is configured. By default, this screen it's enabled. - `withSignUpFields(List)` shows a second screen with extra fields after completing the sign up fields. - `withProviderResolver(AuthProviderResolver)` pass your own AuthProviderResolver instance to query for AuthProviders. - `withSocialButtonStyle(int)` allows to customize the Style of the Social buttons. Possible values are SMALL and BIG. If this is not specified, it will default to SMALL when many Social and Db/Enterprise connections are configured; and BIG on the rest of the cases. - `usePKCE(boolean)` whether to use the new PKCE flow or the old Token exchange one when authenticating. By default, it won't use PKCE. ================================================ FILE: EXAMPLES.md ================================================ # Examples using Lock.Android - [Examples using Lock.Android](#examples-using-lockandroid) - [Passwordless & Social authentication](#passwordless--social-authentication) - [Android App Links - Custom Scheme](#android-app-links---custom-scheme) - [Using Proguard](#using-proguard) ## Passwordless & Social authentication The Passwordless feature requires your Application to have the *Passwordless OTP* Grant Type enabled first. Check [this article](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it. `PasswordlessLockActivity` authenticates users by sending them an Email or SMS (similar to how WhatsApp authenticates you). In order to be able to authenticate the user, your application must have the SMS/Email connection enabled and configured in your [dashboard](https://manage.auth0.com/#/connections/passwordless). Initialize **PasswordlessLock** and handle the release of its resources appropriately after you're doing using it. ```kotlin // This activity will show PasswordlessLock class MyActivity : AppCompatActivity() { private lateinit var lock: PasswordlessLock override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val account = Auth0(this) // Instantiate Lock once lock = PasswordlessLock.newBuilder(account, callback) // Customize Lock .build(this) } override fun onDestroy() { super.onDestroy() // Important! Release Lock and its resources lock.onDestroy(this) } private val callback = object : AuthenticationCallback() { override fun onAuthentication(credentials: Credentials) { // Authenticated } override fun onError(error: AuthenticationException) { // An exception occurred } } } ``` Start `PasswordlessLockActivity` from inside your `Activity`. For this, create a new intent and launch it. ```kotlin startActivity(lock.newIntent(this)) ``` ## Android App Links - Custom Scheme The default scheme used by the library to generate the Callback URL for Web Authentication is `https`. This works best for Android Marshmallow (API 23) or newer if you're using [Android App Links](https://developer.android.com/training/app-links/index.html). However, in previous Android versions, this may show the disambiguation dialog prompting the user to choose either your application or the browser to resolve the intent. You can change this behavior by using a unique custom scheme so that the OS opens the link directly with your app. 1. Update the `auth0Scheme` Manifest Placeholder value in the `app/build.gradle` file or directly in the Intent Filter definition in the `AndroidManifest.xml` file by changing the existing scheme to the new one. 2. Update the "Allowed Callback URLs" in your [Auth0 Dashboard](https://manage.auth0.com/#/clients) Application's settings to match URLs that begin with the new scheme. 3. Call `withScheme()` in the Lock.Builder/PasswordlessLock.Builder passing the scheme you want to use. > The scheme value **must** be all lowercase. A warning message will be logged if this is not the case and authentication will never complete. ## Using Proguard The rules should be applied automatically if your application is using `minifyEnabled = true`. If you want to include them manually check the [proguard directory](proguard). By default you should at least use the following files: * `proguard-gson.pro` * `proguard-otto.pro` * `proguard-lock-2.pro` As this library depends on `Auth0.Android`, you should keep the files up to date with the proguard rules defined in the SDK [repository](https://github.com/auth0/Auth0.Android). ================================================ FILE: LICENSE.md ================================================ The MIT License (MIT) Copyright (c) 2016 Auth0, Inc. (http://auth0.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: MIGRATION_GUIDE.md ================================================ # Migration Guide This guide will help you migrate Lock.Android from version v2.x.x to version v3.x.x. ## About this release The new version makes use of the latest Auth0.Android SDK, bringing improvements such as: - Open ID Connect compliant practices. - ID token verification for Web Authentication flows. - A new customizable networking stack. - Simpler Android app set up. Some of these features were previously available, but only enforced when the "OIDC" flag was explicitly enabled. ## New requirements Using the latest core SDK comes with new constraints. Your Android application will need to: - Require a minimum Android version of 21 and above. - Target Java version 8 and above. Here’s what you need in build.gradle to target Java 8 byte code for the Android and Kotlin plugins respectively. ```groovy android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } ``` ## Changes to the AndroidManifest file In the previous version you had to declare the Lock activities you planned to use. These activities are now declared internally by the library with intent filters configured using the Manifest Placeholders that you provide for the Domain and Scheme. The Manifest Merger tool will process these and include them as part of your Android application. If your `AndroidManifest.xml` file includes declarations for `LockActivity`, `PasswordlessLockActivity` or `CountryCodeActivity`, you should remove them to avoid duplicated intent filter declarations. If you are using a custom style for the theme or need to override the intent-filter declarations in any of these activities, you will have to declare an activity with the same component name and annotate it with `tools:node="replace"`. Find details about the merging rules that will be used in the [Android Manifest Merger article](https://developer.android.com/studio/build/manifest-merge). ## Changes to the Public API As part of removing legacy APIs or authentication flows no longer recommended for mobile clients, the following features are no longer available: - Web Authentication flow using a WebView component instead of an external Browser. Please refer to [this blog post](https://auth0.com/blog/google-blocks-oauth-requests-from-embedded-browsers/) for additional information. - Web Authentication flow using a response type other than "code". - Authentication API methods categorized as Legacy in the [API docs](https://auth0.com/docs/api/authentication). Continue reading for the detail of classes and methods that were impacted. ### Updated Callbacks The widget requires a callback to receive the results in. The interface for this is `LockCallback`, which takes either an event or an error. The `onError` method got updated to receive an `AuthenticationException` instead of `LockException`. This change will help developers extract the *code* and *description* of the error and understand better what went wrong and how to recover from it. The change impacts the abstract subclass `AuthenticationCallback`. Additionally, this class no longer has an `onCanceled` method. If you need to handle this scenario you have two options: - Implement `LockCallback` and handle the different event types, checking for `LockEvent.CANCELED`. - Implement `AuthenticationCallback` and check the received exception using the `AuthenticationException#isCanceled()` method. ```kotlin // Before val callback: LockCallback = object : AuthenticationCallback() { override fun onAuthentication(credentials: Credentials) { // Authenticated } override fun onCanceled() { // Canceled } override fun onError(error: LockException) { // Another error. Check code & description. } } // After val callback: LockCallback = object : AuthenticationCallback() { override fun onAuthentication(credentials: Credentials) { // Authenticated } override fun onError(error: AuthenticationException) { if (error.isCanceled) { // Canceled } else { // Another error. Check code & description. } } } ``` ### Removed classes - `VoidCallback` is no longer available. Please, use `Callback` instead. - `LockException` is no longer available. This impacts the `LockCallback` and `AuthenticationCallback` classes. Please, use `AuthenticationException` instead. ### Removed methods #### From class `AuthenticationCallback` - Removed `public void onCanceled()`. Instead, an exception will be raised through the `public void onError(AuthenticationException)` method. Check for this scenario using the `AuthenticationException#isCanceled()` method. #### From class `Lock.Builder` - Removed `public Builder useBrowser(boolean)`. The library will always use a third party browser app instead of a Web View to authenticate. No replacement is available. - Removed `public Builder useImplicitGrant(boolean)`. The library will always use the "Proof Key for Code Exchange" (PKCE) flow. Your application must be configured with the type "Native" and the "OIDC Conformant" switch ON. No replacement is available. - Removed `public Builder withAuthButtonSize(int)`. Social buttons will always have a "large button" style. No replacement is available. #### From class `PasswordlessLock.Builder` - Removed `public Builder useBrowser(boolean)`. The library will always use a third party browser app instead of a Web View to authenticate. No replacement is available. - Removed `public Builder useImplicitGrant(boolean)`. The library will always use the "Proof Key for Code Exchange" (PKCE) flow. Your application must be configured with the type "Native" and the "OIDC Conformant" switch ON. No replacement is available. - Removed `public Builder withAuthButtonSize(int)`. Social buttons will always have a "large button" style. No replacement is available. #### From `Auth0` class - Removed `setOIDCConformant(boolean)`. The library will only use Open ID Connect compliant flows from now on, this cannot be turned off. - Removed `setLoggingEnabled(boolean)`. The ability to turn on the networking logs has been removed. If you need to inspect the traffic, take a look at the [Network Profiler](https://developer.android.com/studio/profile/network-profiler) tool. ### Changed methods #### From cass `Lock.Builder` - Changed `public Builder withAuthenticationParameters(@NonNull Map authenticationParameters)` to `public Builder withAuthenticationParameters(@NonNull Map authenticationParameters)`. Request parameters must be specified as String key/values. #### From cass `PasswordlessLock.Builder` - Changed `public Builder withAuthenticationParameters(@NonNull Map authenticationParameters)` to `public Builder withAuthenticationParameters(@NonNull Map authenticationParameters)`. Request parameters must be specified as String key/values. ### Changes to the underlying SDK The core SDK has been updated to the version 2+. Since this is exposed as an API scoped dependency, if you were using any of the classes or methods that changed in the new major release (e.g. the `WebAuthProvider` class), you might need to update your code. Follow the [Auth0.Android Migration Guide](https://github.com/auth0/Auth0.Android/blob/main/V2_MIGRATION_GUIDE.md) to assess the impact. ## Changes in behavior ### Lock lifecycle The widget registers a Broadcast Listener to expect and handle the different lifecycle events. The listener is registered as soon as a new instance of `Lock` or `PasswordlessLock` is created with the corresponding Builder class, and the listener is unregistered when the `onDestroy` method is invoked. Forgetting to call this method would retain unnecessary resources after the authentication is complete and the widget is no longer required, or cause the callback to receive duplicated calls. In case you are not currently calling it, make sure to update your code adding the `lock?.onDestroy(this)` call. ```kotlin class MyActivity : AppCompatActivity() { private lateinit var lock: Lock override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val account = Auth0(this) // Create a reusable Lock instance lock = Lock.newBuilder(account, callback) // Customize Lock // .withScheme("myapp") .build(this) } private fun launchLock() { // Invoke as many times as needed val intent = lock.newIntent(this) startActivity(intent) } override fun onDestroy() { super.onDestroy() // Release Lock resources lock.onDestroy(this) } } ``` ### Non-recoverable errors The `LockCallback` will get its `onError` method invoked when an [Auth0 Rule](https://auth0.com/docs/rules) returns an `Error` or `UnauthorizedError`. This was previously handled internally by Lock, causing it to display an orange toast with a generic failure message. From this release on, if you are using Auth0 Rules and throwing custom errors, you should obtain the _cause_ of the exception and read the code or description values to understand what went wrong. ================================================ FILE: README.md ================================================ > **Note** > As part of our ongoing commitment to best security practices, we have rotated the signing keys used to sign previous releases of this SDK. As a result, new patch builds have been released using the new signing key. Please upgrade at your earliest convenience. > > While this change won't affect most developers, if you have implemented a dependency signature validation step in your build process, you may notice a warning that past releases can't be verified. This is expected, and a result of the key rotation process. Updating to the latest version will resolve this for you. ![Lock for Android](https://cdn.auth0.com/website/sdks/banners/lock-android-banner.png) [![CircleCI](https://circleci.com/gh/auth0/Lock.Android.svg?style=shield)](https://circleci.com/gh/auth0/Lock.Android) [![License](https://img.shields.io/dub/l/vibe-d.svg?style=flat)](https://opensource.org/licenses/MIT) [![Maven Central](https://img.shields.io/maven-central/v/com.auth0.android/lock.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.auth0.android%22%20AND%20a%3A%22lock%22) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/auth0/Lock.Android) 📚 [Documentation](#documentation) • 🚀 [Getting Started](#getting-started) • ⏭️ [Next Steps](#next-steps) • 💬 [Feedback](#feedback) ## Documentation - [Examples](https://github.com/auth0/Lock.android/blob/main/EXAMPLES.md) - [Docs Site](https://auth0.com/docs/libraries/lock-android) - [API Reference](https://javadoc.io/doc/com.auth0.android/lock/latest/index.html) ## Getting Started ### Requirements Android API Level 21+ & Java version 8 or above is required in order to use Lock's UI. Here’s what you need in build.gradle to target Java 8 byte code for the Android and Kotlin plugins respectively. ```groovy android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } ``` ### Installation Lock is available in [Maven Central](http://search.maven.org). To start using *Lock* add this line to the dependencies of your `build.gradle` file: ```groovy implementation 'com.auth0.android:lock:3.2.2' ``` ## Next Steps If you haven't done yet, go to [Auth0](https://auth0.com) and create an Account, it's free! Then create a new [Application](https://manage.auth0.com/#/applications) of type *Native* and add a URL in *Allowed Callback URLs* with the following format: ``` https://{YOUR_AUTH0_DOMAIN}/android/{YOUR_APP_PACKAGE_NAME}/callback ``` The *package name* value required in the Callback URL can be found in your app's `build.gradle` file in the `applicationId` property. Both the *domain* and *client id* values can be found at the top of your Auth0 Application's settings. You're going to use them to setup the SDK. It's good practice to add them to the `strings.xml` file as string resources that you can reference later from the code. This guide will follow that practice. ```xml YOUR_AUTH0_CLIENT_ID YOUR_AUTH0_DOMAIN ``` In your `app/build.gradle` file add the **Manifest Placeholders** for the Auth0 Domain and Auth0 Scheme properties, which are going to be used internally by the library to declare the Lock activities and register **intent-filters** that will capture the authentication result. ```groovy apply plugin: 'com.android.application' android { compileSdkVersion 30 defaultConfig { applicationId "com.auth0.samples" minSdkVersion 21 targetSdkVersion 30 //... //---> Add the next line manifestPlaceholders = [auth0Domain: "@string/com_auth0_domain", auth0Scheme: "https"] //<--- } //... } ``` The next step is to create an instance of `Auth0` with your application's information. The easiest way to create it is by using the values defined previously in the `strings.xml` file and passing an Android Context. For this to work, you must have defined the string resources using the same keys as listed above. ```kotlin val account = Auth0(context) ``` Alternatively, you can directly pass the values. ```kotlin val account = Auth0("{YOUR_AUTH0_CLIENT_ID}", "{YOUR_AUTH0_DOMAIN}") ``` Or, if you are using _custom domains_ and are required to specify a different URL to fetch the Lock widget configuration from, you can use the constructor that takes 3 parameters: ```kotlin val account = Auth0("{YOUR_AUTH0_CLIENT_ID}", "{YOUR_AUTH0_DOMAIN}", "{THE_CONFIGURATION_DOMAIN}") ``` ### Email/Password, Enterprise & Social authentication Initialize **Lock** and handle the release of its resources appropriately after you're done using it. ```kotlin // This activity will show Lock class MyActivity : AppCompatActivity() { private lateinit var lock: Lock override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val account = Auth0(this) // Instantiate Lock once lock = Lock.newBuilder(account, callback) // Customize Lock .build(this) } override fun onDestroy() { super.onDestroy() // Important! Release Lock and its resources lock.onDestroy(this) } private val callback = object : AuthenticationCallback() { override fun onAuthentication(credentials: Credentials) { // Authenticated } override fun onError(error: AuthenticationException) { // An exception occurred } } } ``` Start `LockActivity` from inside your `Activity`. For this, create a new intent from the Lock instance and launch it. ```kotlin startActivity(lock.newIntent(this)) ``` ### Customizing the widget When using the `Builder` to instantiate the widget, you can pass different options to customize how it will behave. Some options are only available for **Lock** or **PasswordlessLock**. Below you will find a few of them. You can always explore all the available options with your IDE's auto-complete shortcut. Check the Javadocs to understand the default values. ```kotlin // Create a new builder from Lock or LockPasswordless classes newBuilder(account, callback) // Shared options .closable(true) // Allows the widget to be closed with the back button .withScope('new-scope') // Changes the scope to be requested on authentication .withAudience('my-api') // Changes the audience to be requested on authentication .withScheme('myapp') // Changes the scheme part used to generate the Callback URL (more below) // Lock specific options .initialScreen(InitialScreen.SIGN_UP) // Allows to choose the screen to be displayed first .allowLogIn(false) // Disables the Log In screen .allowSignUp(false) // Disables the Sign Up screen .allowForgotPassword(false) // Disables the Change Password screen .setDefaultDatabaseConnection('my-connection') // When multiple are available, select one // PasswordlessLock specific options .useCode(true) // Requests to receive a OTP that will need to be filled in your android app to authenticate the user .useLink(false) // Requests to receive a link that will open your android app to authenticate the user .rememberLastLogin(true) // Saves the email or phone number to avoid re-typing it in the future // Build the instance .build(this) ``` ## Feedback ### Contributing We appreciate feedback and contribution to this repo! Before you get started, please see the following: - [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) - [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) ### Raise an issue To provide feedback or report a bug, [please raise an issue on our issue tracker](https://github.com/auth0/Lock.Android/issues). ### Vulnerability Reporting Please do not report security vulnerabilities on the public Github issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. ---

Auth0 Logo

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

This project is licensed under the MIT license. See the LICENSE file for more info.

================================================ FILE: app/.gitignore ================================================ # Created by https://www.gitignore.io/api/intellij,android,osx,windows ### Intellij ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm *.iml ## Directory-based project format: .idea/ # if you remove the above rule, at least ignore the following: # User-specific stuff: # .idea/workspace.xml # .idea/tasks.xml # .idea/dictionaries # .idea/shelf # Sensitive or high-churn files: # .idea/dataSources.ids # .idea/dataSources.xml # .idea/sqlDataSources.xml # .idea/dynamic.xml # .idea/uiDesigner.xml # Gradle: # .idea/gradle.xml # .idea/libraries # Mongo Explorer plugin: # .idea/mongoSettings.xml ## File-based project format: *.ipr *.iws ## Plugin-specific files: # IntelliJ /out/ # mpeltonen/sbt-idea plugin .idea_modules/ # JIRA plugin atlassian-ide-plugin.xml # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties ### Android ### # Built application files *.apk *.ap_ # Files for the Dalvik VM *.dex # Java class files *.class # Generated files bin/ gen/ # Gradle files .gradle/ build/ # Local configuration file (sdk path, etc) local.properties # Proguard folder generated by Eclipse proguard/ # Log Files *.log # Android Studio Navigation editor temp files .navigation/ # Android Studio captures folder captures/ ### Android Patch ### gen-external-apklibs ### OSX ### .DS_Store # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes ================================================ FILE: app/build.gradle ================================================ plugins { id "com.android.application" } apply plugin: 'kotlin-android' android { compileSdkVersion 33 defaultConfig { applicationId "com.auth0.android.lock.app" minSdkVersion 21 targetSdkVersion 33 versionCode 1 versionName "1.0" manifestPlaceholders = [auth0Domain: "@string/com_auth0_domain", auth0Scheme: "demo"] } signingConfigs { release { storeFile file("release-test.jks") storePassword "android" keyAlias "android" keyPassword "android" } } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } } packagingOptions { exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' } compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } } dependencies { testImplementation 'junit:junit:4.13.2' implementation project(':lock') implementation 'androidx.appcompat:appcompat:1.3.0' implementation 'com.google.android.material:material:1.4.0' implementation "androidx.core:core-ktx:1.9.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } ================================================ FILE: app/proguard-rules.pro ================================================ # Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in /Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} ## Debugging -renamesourcefileattribute SourceFile -keepattributes SourceFile, LineNumberTable -verbose ================================================ FILE: app/src/main/AndroidManifest.xml ================================================ ================================================ FILE: app/src/main/java/com/auth0/android/lock/app/DemoActivity.kt ================================================ /* * DemoActivity.java * * Copyright (c) 2016 Auth0 (http://auth0.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.auth0.android.lock.app import android.os.Bundle import android.view.View import android.widget.Button import android.widget.CheckBox import android.widget.LinearLayout import android.widget.RadioGroup import androidx.appcompat.app.AppCompatActivity import com.auth0.android.Auth0 import com.auth0.android.authentication.AuthenticationException import com.auth0.android.callback.Callback import com.auth0.android.lock.* import com.auth0.android.provider.WebAuthProvider.login import com.auth0.android.provider.WebAuthProvider.logout import com.auth0.android.result.Credentials import com.google.android.material.snackbar.Snackbar class DemoActivity : AppCompatActivity() { // Configured instances private var lock: Lock? = null private var passwordlessLock: PasswordlessLock? = null // Views private lateinit var rootLayout: View private lateinit var groupSubmitMode: RadioGroup private lateinit var checkboxClosable: CheckBox private lateinit var groupPasswordlessChannel: RadioGroup private lateinit var groupPasswordlessMode: RadioGroup private lateinit var checkboxConnectionsDB: CheckBox private lateinit var checkboxConnectionsEnterprise: CheckBox private lateinit var checkboxConnectionsSocial: CheckBox private lateinit var checkboxConnectionsPasswordless: CheckBox private lateinit var checkboxHideMainScreenTitle: CheckBox private lateinit var groupDefaultDB: RadioGroup private lateinit var groupUsernameStyle: RadioGroup private lateinit var checkboxLoginAfterSignUp: CheckBox private lateinit var checkboxScreenLogIn: CheckBox private lateinit var checkboxScreenSignUp: CheckBox private lateinit var checkboxScreenReset: CheckBox private lateinit var groupInitialScreen: RadioGroup override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.demo_activity) rootLayout = findViewById(R.id.scrollView) //Basic groupSubmitMode = findViewById(R.id.group_submitmode) checkboxClosable = findViewById(R.id.checkbox_closable) checkboxHideMainScreenTitle = findViewById(R.id.checkbox_hide_title) checkboxConnectionsDB = findViewById(R.id.checkbox_connections_db) checkboxConnectionsEnterprise = findViewById(R.id.checkbox_connections_enterprise) checkboxConnectionsSocial = findViewById(R.id.checkbox_connections_social) checkboxConnectionsPasswordless = findViewById(R.id.checkbox_connections_Passwordless) groupPasswordlessChannel = findViewById(R.id.group_passwordless_channel) groupPasswordlessMode = findViewById(R.id.group_passwordless_mode) //Advanced groupDefaultDB = findViewById(R.id.group_default_db) groupUsernameStyle = findViewById(R.id.group_username_style) checkboxLoginAfterSignUp = findViewById(R.id.checkbox_login_after_signup) checkboxScreenLogIn = findViewById(R.id.checkbox_enable_login) checkboxScreenSignUp = findViewById(R.id.checkbox_enable_signup) checkboxScreenReset = findViewById(R.id.checkbox_enable_reset) groupInitialScreen = findViewById(R.id.group_initial_screen) //Buttons val advancedContainer = findViewById(R.id.advanced_container) val checkboxShowAdvanced = findViewById(R.id.checkbox_show_advanced) checkboxShowAdvanced.setOnCheckedChangeListener { _, b -> advancedContainer.visibility = if (b) View.VISIBLE else View.GONE } val btnShowLockClassic = findViewById