diff --git a/.babelrc b/.babelrc index dff0b438a..b15a16cfa 100644 --- a/.babelrc +++ b/.babelrc @@ -2,37 +2,11 @@ "plugins": [ "version-inline", "transform-css-import-to-string", - "babel-plugin-stylus-compiler" + "babel-plugin-stylus-compiler", + "@babel/plugin-proposal-function-bind" ], "presets": [ - [ - "es2015", - { - "loose": true, - "modules": false - } - ], - "stage-0", - "react" - ], - "env": { - "test": { - "plugins": [ - "transform-es2015-modules-commonjs" - ] - }, - "npm": { - "presets": [ - [ - "es2015", - { - "loose": true, - "modules": "commonjs" - } - ], - "stage-0", - "react" - ] - } - } -} \ No newline at end of file + ["@babel/preset-env", { "useBuiltIns": "entry", "corejs": "3.26.1" }], + "@babel/preset-react" + ] +} diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 000000000..4c9cee3a5 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1 @@ +defaults, last 2 versions, not dead, IE 11 diff --git a/.circleci/config.yml b/.circleci/config.yml index b6218a527..e770f318a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,41 +1,92 @@ -version: 2 +version: 2.1 +orbs: + ship: auth0/ship@0 +executors: + docker-executor: + docker: + - image: cimg/node:18.15-browsers jobs: build-and-test: - docker: - - image: circleci/node:10.16.0-browsers + executor: docker-executor environment: - LANG: en_US.UTF-8 + LANG: en_US.UTF-8 steps: - checkout - - run: + - run: name: Update Yarn - command: 'sudo npm update -g yarn' - - restore-cache: + command: 'npm update -g yarn' + - restore_cache: name: Restore Yarn Package Cache - keys: - - yarn-packages-{{ checksum "yarn.lock" }} + key: yarn-packages-{{ checksum "yarn.lock" }} - run: name: Install Dependencies command: yarn install - - save-cache: + - save_cache: name: Save Yarn Package Cache key: yarn-packages-{{ checksum "yarn.lock" }} paths: - ~/.cache/yarn - - run: + - run: name: Build - command: yarn run build - - run: - name: Setup Test Env - command: yarn run test:cli - - run: - name: Tests - command: yarn run test:jest + command: yarn build + - run: + name: ES5 compatibility check + command: yarn test:es-check + - run: + name: Validate language files + command: yarn i18n:validate + - run: + name: Unit Tests + command: yarn test - store_artifacts: path: build + browserstack: + executor: docker-executor + environment: + LANG: en_US.UTF-8 + steps: + - checkout + - run: + name: Update Yarn + command: 'npm update -g yarn' + - restore_cache: + name: Restore Yarn Package Cache + key: yarn-packages-{{ checksum "yarn.lock" }} + - run: + name: Install Dependencies + command: yarn install + - save_cache: + name: Save Yarn Package Cache + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ~/.cache/yarn + - run: + name: Build + command: yarn build + - run: + name: Browser Tests + command: yarn test:e2e:browserstack + workflows: - version: 2 build-test-report: jobs: - - build-and-test \ No newline at end of file + - build-and-test + - browserstack: + requires: + - build-and-test + context: + - browserstack-env + - ship/node-publish: + requires: + - build-and-test + pkg-manager: yarn + node-version: 18.12.1 + context: + - publish-npm + - publish-gh + filters: + branches: + only: + - master + - beta diff --git a/.eslintrc.json b/.eslintrc.json index d813c18bc..cad5b3246 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,14 +1,22 @@ { - "extends": ["plugin:react/recommended", "prettier", "prettier/react"], + "extends": ["plugin:react/recommended", "prettier"], "env": { "browser": true, "es6": true }, "parser": "babel-eslint", "rules": { - "react/display-name": 0, - "react/prop-types": 1, - "react/no-find-dom-node": 1, - "react/no-string-refs": 1 - } + "react/display-name": "off", + "react/prop-types": "warn", + "react/no-find-dom-node": "warn", + "react/no-string-refs": "warn", + "react/no-danger": "error" + }, + "plugins": ["react"], + "settings": { + "react": { + "version": "detect" + } + }, + "ignorePatterns": ["build/"] } diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yml b/.github/ISSUE_TEMPLATE/Bug Report.yml new file mode 100644 index 000000000..47284167e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug Report.yml @@ -0,0 +1,79 @@ +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: markdown + attributes: + value: | + :warning: **Note:** We are no longer supporting requests for new features. Only requests for bug fixes or security patches will be considered. + + - type: checkboxes + id: checklist + attributes: + label: Checklist + options: + - label: I have looked into the [Readme](https://github.com/auth0/lock#readme) and [Examples](https://github.com/auth0/lock/blob/master/EXAMPLES.md), and have not found a suitable solution or answer. + required: true + - label: I have searched the [issues](https://github.com/auth0/lock/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 version + validations: + required: true + + - type: dropdown + id: environment-browser + attributes: + label: Which browsers have you tested in? + multiple: true + options: + - Chrome + - Edge + - Safari + - Firefox + - Opera + - IE + - Other + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f9b244adf..87a5b54df 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,8 @@ blank_issues_enabled: false contact_links: - name: Auth0 Community - url: https://community.auth0.com/c/sdks/5 + url: https://community.auth0.com about: Discuss this SDK in the Auth0 Community forums - name: Library Documentation - url: https://auth0.com/docs/libraries/lock/v11 + url: https://auth0.com/docs/libraries/lock about: Read the library docs on Auth0.com diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 68352ba23..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: Feature request -about: Suggest an idea or a feature for this project -title: '' -labels: feature request -assignees: '' ---- - - - -### Describe the problem you'd like to have solved - - - -### Describe the ideal solution - - - -## Alternatives and current work-arounds - - - -### Additional information, if any - - \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/report-a-bug.md b/.github/ISSUE_TEMPLATE/report-a-bug.md deleted file mode 100644 index e5e05004d..000000000 --- a/.github/ISSUE_TEMPLATE/report-a-bug.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -name: Report a bug -about: Have you found a bug or issue? Create a bug report for this SDK -title: '' -labels: bug report -assignees: '' - ---- - -**Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. - -**Thank you in advance for helping us to improve this library!** Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the [Auth0 Community](https://community.auth0.com/) or [Auth0 Support](https://support.auth0.com/). Finally, to avoid duplicates, please search existing Issues before submitting one here. - -By submitting an Issue to this repository, you agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). - -### Describe the problem - -> Provide a clear and concise description of the issue - -### What was the expected behavior? - -> Tell us about the behavior you expected to see - -### Reproduction - -> Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent. -> **Note**: If clear, reproducable steps or the smallest sample app demonstrating misbehavior cannot be provided, we may not be able to follow up on this bug report. - -- Step 1.. -- Step 2.. -- ... - -> Where applicable, please include: -> -> - The smallest possible sample app that reproduces the undesirable behavior -> - Log files (redact/remove sensitive information) -> - Application settings (redact/remove sensitive information) -> - Screenshots - -### Environment - -> Please provide the following: - -- **Version of Lock used:** -- **Which browsers have you tested in?** -- **Other modules/plugins/libraries that might be involved:** diff --git a/.github/ISSUE_TEMPLATE/report_a_bug.md b/.github/ISSUE_TEMPLATE/report_a_bug.md deleted file mode 100644 index 50b9fa7eb..000000000 --- a/.github/ISSUE_TEMPLATE/report_a_bug.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: Report a bug -about: Have you found a bug or issue? Create a bug report for this SDK -title: '' -labels: bug report -assignees: '' ---- - - - -### Describe the problem - - - -### What was the expected behavior? - - - -### Reproduction - - -- Step 1.. -- Step 2.. -- ... - -### Environment - - - -- **Version of this library used:** -- **Which framework are you using, if applicable:** -- **Other modules/plugins/libraries that might be involved:** -- **Any other relevant information you think would be useful:** \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 49d60917a..821b93155 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,15 @@ ### Changes + ### References + ### Testing + * [ ] This change adds unit test coverage * [ ] This change adds integration test coverage @@ -29,7 +34,5 @@ Please describe how this can be tested by reviewers. Be specific about anything * [ ] 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 * [ ] All code quality tools/guidelines have been run/followed * [ ] All relevant assets have been compiled -* [ ] All active GitHub checks have passed diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5c2596fe4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] diff --git a/.github/stale.yml b/.github/stale.yml index 776a7009c..81d5c553c 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -6,10 +6,17 @@ daysUntilStale: 30 # 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: ['needs investigation', 'bug'] +# Only issues or pull requests with all of these labels are considered by StaleBot. Defaults to `[]` (disabled) +onlyLabels: + - 'needs more info' -# Set to true to ignore issues with an assignee (defaults to false) +# Ignore issues in projects +exemptProjects: true + +# Ignore issues and PRs in milestones +exemptMilestones: true + +# Set to true to ignore issues with an assignee exemptAssignees: true # Label to use when marking as stale diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..bc7fa9823 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: [ "master", "v6", "v7", "v8", "v9-optional-signup-username", "v9", "v10" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: "11 10 * * 4" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ javascript ] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml new file mode 100644 index 000000000..916745ee4 --- /dev/null +++ b/.github/workflows/semgrep.yml @@ -0,0 +1,25 @@ +name: Semgrep + +on: + pull_request: {} + + push: + branches: ["master", "main"] + + schedule: + - cron: '30 0 1,15 * *' + +jobs: + semgrep: + name: Scan + runs-on: ubuntu-latest + container: + image: returntocorp/semgrep + # Skip any PR created by dependabot to avoid permission issues + if: (github.actor != 'dependabot[bot]') + steps: + - uses: actions/checkout@v3 + + - run: semgrep ci + env: + SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} diff --git a/.gitignore b/.gitignore index 7210cc4fa..3cbc4e3a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .DS_Store coverage/ -build/ css/index.css lib/ node_modules/ @@ -8,4 +7,8 @@ release/ npm-debug.log .css.map .idea/ -.env \ No newline at end of file +.env +local.log +yarn-error.log +build/ +.yarn/ diff --git a/.npmignore b/.npmignore index 4ee7d546b..45203c2b1 100644 --- a/.npmignore +++ b/.npmignore @@ -9,7 +9,6 @@ scripts/ src/ support/ test/ -bower.json Gruntfile.js .css.map *~ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..d16386367 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +build/ \ No newline at end of file diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 000000000..63c2e3354 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,5 @@ +printWidth: 100 +singleQuote: true +trailingComma: none +arrowParens: avoid +endOfLine: auto diff --git a/.semgrepignore b/.semgrepignore new file mode 100644 index 000000000..4de106b2f --- /dev/null +++ b/.semgrepignore @@ -0,0 +1,7 @@ +.circleci/ +.github/ +.vscode/ +css/ +examples/ +support/ +test/ diff --git a/.shiprc b/.shiprc new file mode 100644 index 000000000..d773ca9b5 --- /dev/null +++ b/.shiprc @@ -0,0 +1,6 @@ +{ + "files": { + "README.md": [] + }, + "postbump": "yarn dist build" +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..a26479904 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Jest (current file)", + "program": "${workspaceFolder}/node_modules/.bin/jest", + "args": ["${fileBasenameNoExtension}"], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index fc7e1c127..59a200ee6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,13 +2,9 @@ // Place your settings in this file to overwrite default and user settings. "search.exclude": { "**/node_modules": true, - "**/bower_components": true, "**/lib": true, "**/coverage": true, "**/examples": true, "**/build": true - }, - "editor.formatOnSave": false, - "prettier.printWidth": 100, - "prettier.singleQuote": true + } } diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 000000000..3186f3f07 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/.zuul.yml b/.zuul.yml deleted file mode 100644 index 0bd028f77..000000000 --- a/.zuul.yml +++ /dev/null @@ -1,19 +0,0 @@ -ui: mocha-bdd -tunnel: - type: ngrok - authtoken: LsVZFxFqgxA4h7ibWV9V_iuA9afbQwaSnGqH9dApL -browsers: - - name: chrome - version: latest - - name: safari - version: 9 - - name: firefox - version: latest - - name: ie - version: 10..latest -browserify: - - transform: - name: babelify - - options: - extensions: - - .jsx diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c0fc628f..ae18004d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,189 +1,517 @@ # Change Log +## [v12.0.2](https://github.com/auth0/lock/tree/v12.0.2) (2023-02-10) +[Full Changelog](https://github.com/auth0/lock/compare/v12.0.1...v12.0.2) + +**Changed** +- Slight tweaks to Captcha input component handler methods + refresh button mask [\#2272](https://github.com/auth0/lock/pull/2272) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +**Fixed** +- Fix for when component is undefined on unmount [\#2271](https://github.com/auth0/lock/pull/2271) ([codetheweb](https://github.com/codetheweb)) + +## [v12.0.1](https://github.com/auth0/lock/tree/v12.0.1) (2023-02-01) +[Full Changelog](https://github.com/auth0/lock/compare/v12.0.0...v12.0.1) + +**Changed** +- FDR-487 - feat: update microsoft button [\#2259](https://github.com/auth0/lock/pull/2259) ([jamescgarrett](https://github.com/jamescgarrett)) + +## [v12.0.0](https://github.com/auth0/lock/tree/v12.0.0) (2023-01-20) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.35.0...v12.0.0) + +Lock is now built using React 18, which resolves a number of security vulnerabilities and improves performance. If you encounter any issues relating to this upgrade, please [submit a bug report](https://github.com/auth0/lock/issues/new?assignees=&labels=bug+report,v12&template=report_a_bug.md&title=). + +Despite the major version bump, **v12 is completely API-compatible with v11**. + +**Changed** + +- Upgrade to React 18 [\#2209](https://github.com/auth0/lock/pull/2209) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Upgrade to Webpack 5 [\#2213](https://github.com/auth0/lock/pull/2213) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Various dependency bumps [see the full changelog](https://github.com/auth0/lock/compare/v11.35.0...v12.0.0) + +## [v11.35.0](https://github.com/auth0/lock/tree/v11.35.0) (2022-12-19) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.34.2...v11.35.0) + +**Added** + +- Support captcha for Passwordless [\#2222](https://github.com/auth0/lock/pull/2222) ([robinbijlani](https://github.com/robinbijlani)) + +**Changed** + +- Bump dependencies to latest patch and fix typos [\#2210](https://github.com/auth0/lock/pull/2210) ([piwysocki](https://github.com/piwysocki)) +- Add CodeQL workflow for GitHub code scanning [\#2197](https://github.com/auth0/lock/pull/2197) ([lgtm-com[bot]](https://github.com/apps/lgtm-com)) +- Use lts-browsers docker image for Circle build [\#2204](https://github.com/auth0/lock/pull/2204) ([piwysocki](https://github.com/piwysocki)) +- homepage added to package.json [\#2208](https://github.com/auth0/lock/pull/2208) ([piwysocki](https://github.com/piwysocki)) +- Remove FAQ reference from README [\#2203](https://github.com/auth0/lock/pull/2203) ([frederikprijck](https://github.com/frederikprijck)) +- Update okta logo [\#2201](https://github.com/auth0/lock/pull/2201) ([jamescgarrett](https://github.com/jamescgarrett)) +- Update readme to match new design [\#2187](https://github.com/auth0/lock/pull/2187) ([ewanharris](https://github.com/ewanharris)) + +## [v12.0.0-beta.0](https://github.com/auth0/lock/tree/v12.0.0-beta.0) (2022-12-08) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.34.2...v12.0.0-beta.0) + +:warning: This is a **beta release** of Lock.js v12 that includes an upgrade to React 18, and should not be used in production. If you find any issues, please [submit a bug report](https://github.com/auth0/lock/issues/new?assignees=&labels=bug+report,v12-beta&template=report_a_bug.md&title=). + +**Changed** + +- Upgrade to React 18 [\#2209](https://github.com/auth0/lock/pull/2209) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Upgrade to Webpack 5, Jest 29, Babel 8 [\#2213](https://github.com/auth0/lock/pull/2213) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- bump dependencies to latest patch and fix typos [\#2210](https://github.com/auth0/lock/pull/2210) ([piwysocki](https://github.com/piwysocki)) +## [v11.34.2](https://github.com/auth0/lock/tree/v11.34.2) (2022-10-10) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.34.1...v11.34.2) + +**Fixed** + +- [SDK-3657] Render sign up confirmation before sign in [\#2180](https://github.com/auth0/lock/pull/2180) ([ewanharris](https://github.com/ewanharris)) + +## [v11.34.1](https://github.com/auth0/lock/tree/v11.34.1) (2022-09-29) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.34.0...v11.34.1) + +**Fixed** + +- [ESD-22705] Don't pass function to ConfirmationPane unless closable is enabled [\#2176](https://github.com/auth0/lock/pull/2176) ([ewanharris](https://github.com/ewanharris)) + +**Security** + +- [ESD-22866] Disable spellcheck and autocorrect on all sensitive input fields [\#2178](https://github.com/auth0/lock/pull/2178) ([ewanharris](https://github.com/ewanharris)) + +## [v11.34.0](https://github.com/auth0/lock/tree/v11.34.0) (2022-09-14) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.33.3...v11.34.0) + +**Added** + +- FDR-297: Adding okta for enterprise [\#2172](https://github.com/auth0/lock/pull/2172) ([jamescgarrett](https://github.com/jamescgarrett)) + +## [v11.33.3](https://github.com/auth0/lock/tree/v11.33.3) (2022-08-16) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.33.2...v11.33.3) + +**Added** + +- IAMRISK-1725 Add password_leaked error label for Signup [\#2160](https://github.com/auth0/lock/pull/2160) ([robinbijlani](https://github.com/robinbijlani)) + +## [v11.33.2](https://github.com/auth0/lock/tree/v11.33.2) (2022-06-29) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.33.1...v11.33.2) + +**Changed** + +- Bump qs from 6.10.5 to 6.11.0 [\#2147](https://github.com/auth0/lock/pull/2147) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump shell-quote from 1.7.2 to 1.7.3 [\#2145](https://github.com/auth0/lock/pull/2145) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump prettier from 2.7.0 to 2.7.1 [\#2144](https://github.com/auth0/lock/pull/2144) ([dependabot[bot]](https://github.com/apps/dependabot)) + +## [v11.33.1](https://github.com/auth0/lock/tree/v11.33.1) (2022-06-14) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.33.0...v11.33.1) + +**Fixed** + +- Move captcha pane below additional signup fields in UI [\#2135](https://github.com/auth0/lock/pull/2135) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +**Security** + +- [Snyk] Upgrade dompurify from 2.3.6 to 2.3.7 [\#2132](https://github.com/auth0/lock/pull/2132) ([snyk-bot](https://github.com/snyk-bot)) + +## [v11.33.0](https://github.com/auth0/lock/tree/v11.33.0) (2022-05-05) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.32.2...v11.33.0) + +**Important** + +This release contains a change to how [custom signup fields](https://github.com/auth0/lock/#additional-sign-up-fields) are processed. From this release, all HTML tags are stripped from user input into any custom signup field before being sent to Auth0 to register the user. This is a security measure to help mitigate from potential XSS attacks in signup verification emails. + +If you would be affected by this change and require HTML to be specified in a custom signup field, please leave us some feedback in our [issue tracker](https://github.com/auth0/lock/issues). + +**Changed** + +- ui box - div replaced by main [\#2114](https://github.com/auth0/lock/pull/2114) ([piwysocki](https://github.com/piwysocki)) +- More complete support for custom passwordless connections [\#2105](https://github.com/auth0/lock/pull/2105) ([peter-isgfunds](https://github.com/peter-isgfunds)) + +**Fixed** + +- fix: initialize reset password inside componentDidMount [\#2111](https://github.com/auth0/lock/pull/2111) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +**Security** + +- [Snyk] Upgrade dompurify from 2.3.4 to 2.3.5 [\#2101](https://github.com/auth0/lock/pull/2101) ([snyk-bot](https://github.com/snyk-bot)) + +## [v11.32.2](https://github.com/auth0/lock/tree/v11.32.2) (2022-02-08) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.32.1...v11.32.2) + +**Changed** + +- align german loginWithLabel translation with Apple Guidelines [\#2097](https://github.com/auth0/lock/pull/2097) ([Steffen911](https://github.com/Steffen911)) + +**Fixed** + +- [SDK-3087] Captcha for single enterprise AD connections [\#2096](https://github.com/auth0/lock/pull/2096) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +**Security** + +- [Snyk] Upgrade qs from 6.10.2 to 6.10.3 [\#2095](https://github.com/auth0/lock/pull/2095) ([snyk-bot](https://github.com/snyk-bot)) +- Bump cached-path-relative from 1.0.2 to 1.1.0 [\#2091](https://github.com/auth0/lock/pull/2091) ([dependabot[bot]](https://github.com/apps/dependabot)) + +## [v11.32.1](https://github.com/auth0/lock/tree/v11.32.1) (2022-01-27) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.32.0...v11.32.1) + +**Changed** + +- Update auth0-js and support legacySameSiteCookie option [\#2089](https://github.com/auth0/lock/pull/2089) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +**Security** + +- Bump log4js from 6.3.0 to 6.4.0 [\#2087](https://github.com/auth0/lock/pull/2087) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Security upgrade node-fetch to 2.6.7 [\#2085](https://github.com/auth0/lock/pull/2085) ([evansims](https://github.com/evansims)) +- [Snyk] Upgrade prop-types from 15.7.2 to 15.8.0 [\#2083](https://github.com/auth0/lock/pull/2083) ([snyk-bot](https://github.com/snyk-bot)) +- Bump engine.io from 4.1.1 to 4.1.2 [\#2082](https://github.com/auth0/lock/pull/2082) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump follow-redirects from 1.14.4 to 1.14.7 [\#2081](https://github.com/auth0/lock/pull/2081) ([dependabot[bot]](https://github.com/apps/dependabot)) + +## [v11.32.0](https://github.com/auth0/lock/tree/v11.32.0) (2022-01-07) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.31.1...v11.32.0) + +**Fixed** + +- [SDK-2970] Remove captcha for enterprise SSO connections [\#2071](https://github.com/auth0/lock/pull/2071) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Add ID attributes to password field + submit button [\#2072](https://github.com/auth0/lock/pull/2072) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +## [v11.31.1](https://github.com/auth0/lock/tree/v11.31.1) (2021-11-02) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.31.0...v11.31.1) + +**Fixed** + +- Guard references to window on module load [\#2057](https://github.com/auth0/lock/pull/2057) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Ensure Captcha is completed before authenticating with enterprise SSO connection [\#2060](https://github.com/auth0/lock/pull/2060) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +## [v11.31.0](https://github.com/auth0/lock/tree/v11.31.0) (2021-10-15) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.30.6...v11.31.0) + +**Added** + +- [SDK-2295] Add forceAutoHeight property to UI config [\#2050](https://github.com/auth0/lock/pull/2050) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +**Fixed** + +- [SDK-2823] Fix password reset when using custom connection resolver [\#2048](https://github.com/auth0/lock/pull/2048) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +## [v11.30.6](https://github.com/auth0/lock/tree/v11.30.6) (2021-09-27) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.30.5...v11.30.6) + +This release intends to fix the build for Bower users, whilst upgrading some development-time dependencies and build configuration. + +Please see [the diff](https://github.com/auth0/lock/compare/v11.30.5...v11.30.6) for the full set of changes. + +## [v11.30.5](https://github.com/auth0/lock/tree/v11.30.5) (2021-09-13) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.30.4...v11.30.5) + +**Changed** + +[SDK-2708] Use `domain` value for client assets download instead of `cdn.*.auth0.com` [\#2029](https://github.com/auth0/lock/pull/2029) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +**Fixed** + +Inline `util.format` and replace usage of `global` for `window` [\#2030](https://github.com/auth0/lock/pull/2030) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +## [v11.30.4](https://github.com/auth0/lock/tree/v11.30.4) (2021-07-12) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.30.3...v11.30.4) + +**Fixed** + +- Updated Dutch translations [\#2013](https://github.com/auth0/lock/pull/2013) ([erombouts](https://github.com/erombouts)) + +## [v11.30.3](https://github.com/auth0/lock/tree/v11.30.3) (2021-06-25) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.30.2...v11.30.3) + +**Fixed** + +- Fix country dialing code dropdown [\#2009](https://github.com/auth0/lock/pull/2009) ([adamjmcgrath](https://github.com/adamjmcgrath)) + +## [v11.30.2](https://github.com/auth0/lock/tree/v11.30.2) (2021-06-11) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.30.1...v11.30.2) + +**Changed** + +- [ESD-13941] Implement a DOMPurify hook to enable target attributes on links [\#2006](https://github.com/auth0/lock/pull/2006) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +## [v11.30.1](https://github.com/auth0/lock/tree/v11.30.1) (2021-06-04) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.30.0...v11.30.1) + +**Changed** + +- Update fa.js [\#2000](https://github.com/auth0/lock/pull/2000) ([alirezagit](https://github.com/alirezagit)) + +**Fixed** + +- [SDK-2588] Avoid multiple simultaneous HTTP calls [\#1998](https://github.com/auth0/lock/pull/1998) ([frederikprijck](https://github.com/frederikprijck)) + +**Security** + +- Update auth0-js + node-fetch [\#1996](https://github.com/auth0/lock/pull/1996) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SEC-687, SEC-700] For more information on this security release, please see [the release on GitHub](https://github.com/auth0/lock/releases/tag/v11.30.1). + +## [v11.30.0](https://github.com/auth0/lock/tree/v11.30.0) (2021-04-26) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.29.1...v11.30.0) + +**Added** + +- Recaptcha Enterprise support [\#1986](https://github.com/auth0/lock/pull/1986) ([akmjenkins](https://github.com/akmjenkins)) + +**Fixed** + +- [ESD-12716]fix recaptcha on mobile when lang is not English [\#1988](https://github.com/auth0/lock/pull/1988) ([jfromaniello](https://github.com/jfromaniello)) + +## [v11.29.1](https://github.com/auth0/lock/tree/v11.29.1) (2021-04-14) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.29.0...v11.29.1) + +**Fixed** + +- fix ESD-12716: move CSS display override to render function to fix recaptcha on sign-up [\#1983](https://github.com/auth0/lock/pull/1983) ([jfromaniello](https://github.com/jfromaniello)) + +## [v11.29.0](https://github.com/auth0/lock/tree/v11.29.0) (2021-04-06) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.28.1...v11.29.0) + +**Added** + +- [SDK-2412] Add event for SSO data fetch [\#1977](https://github.com/auth0/lock/pull/1977) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-2306] Add login and signup hooks [\#1976](https://github.com/auth0/lock/pull/1976) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +**Fixed** + +- [ESD-12716] fix issue with recaptcha in mobile [\#1978](https://github.com/auth0/lock/pull/1978) ([jfromaniello](https://github.com/jfromaniello)) +- Fixes typo "assests" to "assets" [\#1975](https://github.com/auth0/lock/pull/1975) ([morkro](https://github.com/morkro)) +- Remove line breaks from passwordless vcode entry instructions [\#1974](https://github.com/auth0/lock/pull/1974) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Remove padding from screen tabs [\#1971](https://github.com/auth0/lock/pull/1971) ([stevehobbsdev](https://github.com/stevehobbsdev)) + +## [v11.28.1](https://github.com/auth0/lock/tree/v11.28.1) (2021-03-01) + +[Full Changelog](https://github.com/auth0/lock/compare/v11.28.0...v11.28.1) + +**Fixed** + +- Disable form submit manually for passwordless Safari [\#1968](https://github.com/auth0/lock/pull/1968) ([adamjmcgrath](https://github.com/adamjmcgrath)) + +**Security** + +- Upgrade trim version to fix security issue [\#1960](https://github.com/auth0/lock/pull/1960) ([blankg](https://github.com/blankg)) + ## [v11.28.0](https://github.com/auth0/lock/tree/v11.28.0) (2021-01-06) + [Full Changelog](https://github.com/auth0/lock/compare/v11.27.2...v11.28.0) **Added** + - An option to hide username in signup view [\#1954](https://github.com/auth0/lock/pull/1954) ([saltukalakus](https://github.com/saltukalakus)) **Changed** + - Wording and spelling fixes to Bulgarian language file [\#1953](https://github.com/auth0/lock/pull/1953) ([maximnaidenov](https://github.com/maximnaidenov)) ## [v11.27.2](https://github.com/auth0/lock/tree/v11.27.2) (2020-12-16) -[Full Changelog](https://github.com/auth0/lock/compare/v11.27.1...v11.27.2) +[Full Changelog](https://github.com/auth0/lock/compare/v11.27.1...v11.27.2) **Changed** + - Update cs.js [\#1944](https://github.com/auth0/lock/pull/1944) ([HopXXII](https://github.com/HopXXII)) **Fixed** + - [ESD-10361] Fix password strength popup overflow issue [\#1949](https://github.com/auth0/lock/pull/1949) ([stevehobbsdev](https://github.com/stevehobbsdev)) - [ESD-10373] Fix rendering of Lock inside popup on first open [\#1948](https://github.com/auth0/lock/pull/1948) ([stevehobbsdev](https://github.com/stevehobbsdev)) - ## [v11.27.1](https://github.com/auth0/lock/tree/v11.27.1) (2020-10-26) -[Full Changelog](https://github.com/auth0/lock/compare/v11.27.0...v11.27.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.27.0...v11.27.1) **Fixed** + - Remove top padding from wrapper element [\#1939](https://github.com/auth0/lock/pull/1939) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Remove javascript:void(0) from links that do not navigate [\#1938](https://github.com/auth0/lock/pull/1938) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Respect showTerms option for passwordless [\#1931](https://github.com/auth0/lock/pull/1931) ([saltukalakus](https://github.com/saltukalakus)) - ## [v11.27.0](https://github.com/auth0/lock/tree/v11.27.0) (2020-09-18) -[Full Changelog](https://github.com/auth0/lock/compare/v11.26.3...v11.27.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.26.3...v11.27.0) **Changed** + - Better flash error messages on incorrect, empty fields. [\#1923](https://github.com/auth0/lock/pull/1923) ([saltukalakus](https://github.com/saltukalakus)) - [SDK-1946] Update Basecamp logo [\#1922](https://github.com/auth0/lock/pull/1922) ([stevehobbsdev](https://github.com/stevehobbsdev)) **Fixed** + - [SDK-1911] Always use UsernamePane when using custom resolver [\#1918](https://github.com/auth0/lock/pull/1918) ([stevehobbsdev](https://github.com/stevehobbsdev)) **Security** + - Dependencies [\#1924](https://github.com/auth0/lock/pull/1924) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Add license scan report and status [\#1920](https://github.com/auth0/lock/pull/1920) ([fossabot](https://github.com/fossabot)) - ## [v11.26.3](https://github.com/auth0/lock/tree/v11.26.3) (2020-08-14) + [Full Changelog](https://github.com/auth0/lock/compare/v11.26.2...v11.26.3) **Security** + - [SEC-512] Replace usage of i18n.html with i18n.str in Passwordless verification code UI ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.26.2](https://github.com/auth0/lock/tree/v11.26.2) (2020-08-12) + [Full Changelog](https://github.com/auth0/lock/compare/v11.26.1...v11.26.2) **Fixed** + - Fallback to default language dictionary when the language file cannot be loaded [\#1912](https://github.com/auth0/lock/pull/1912) ([davidpatrick](https://github.com/davidpatrick)) - [SDK-1813] Send connection scope config to enterprise connections [\#1910](https://github.com/auth0/lock/pull/1910) ([stevehobbsdev](https://github.com/stevehobbsdev)) **Security** -- [Security] Bump elliptic from 6.4.1 to 6.5.3 [\#1909](https://github.com/auth0/lock/pull/1909) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) +- [Security] Bump elliptic from 6.4.1 to 6.5.3 [\#1909](https://github.com/auth0/lock/pull/1909) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) ## [v11.26.1](https://github.com/auth0/lock/tree/v11.26.1) (2020-07-23) -[Full Changelog](https://github.com/auth0/lock/compare/v11.26.0...v11.26.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.26.0...v11.26.1) **Fixed** -- fix issue #1906 - remove extension from import [\#1907](https://github.com/auth0/lock/pull/1907) ([jfromaniello](https://github.com/jfromaniello)) +- fix issue #1906 - remove extension from import [\#1907](https://github.com/auth0/lock/pull/1907) ([jfromaniello](https://github.com/jfromaniello)) ## [v11.26.0](https://github.com/auth0/lock/tree/v11.26.0) (2020-07-23) -[Full Changelog](https://github.com/auth0/lock/compare/v11.25.1...v11.26.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.25.1...v11.26.0) **Added** + - [CAUTH-423] Add captcha in the sign-up flow [\#1902](https://github.com/auth0/lock/pull/1902) ([jfromaniello](https://github.com/jfromaniello)) **Changed** + - [CAUTH-511] improve error handling on missing captcha [\#1900](https://github.com/auth0/lock/pull/1900) ([jfromaniello](https://github.com/jfromaniello)) **Fixed** -- [SDK-1284] Fix for "growing" tabs when repeatedly clicked [\#1904](https://github.com/auth0/lock/pull/1904) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-1284] Fix for "growing" tabs when repeatedly clicked [\#1904](https://github.com/auth0/lock/pull/1904) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.25.1](https://github.com/auth0/lock/tree/v11.25.1) (2020-07-14) -[Full Changelog](https://github.com/auth0/lock/compare/v11.25.0...v11.25.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.25.0...v11.25.1) **Fixed** -- [SDK-1809] Connection display name is used even when no IdP domains are available [\#1898](https://github.com/auth0/lock/pull/1898) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-1809] Connection display name is used even when no IdP domains are available [\#1898](https://github.com/auth0/lock/pull/1898) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.25.0](https://github.com/auth0/lock/tree/v11.25.0) (2020-07-09) -[Full Changelog](https://github.com/auth0/lock/compare/v11.24.5...v11.25.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.24.5...v11.25.0) **Added** -- [SDK-1710] Allow Lock to use connection display name field from client configuration file [\#1896](https://github.com/auth0/lock/pull/1896) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-1710] Allow Lock to use connection display name field from client configuration file [\#1896](https://github.com/auth0/lock/pull/1896) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.24.5](https://github.com/auth0/lock/tree/v11.24.5) (2020-07-03) -[Full Changelog](https://github.com/auth0/lock/compare/v11.24.4...v11.24.5) +[Full Changelog](https://github.com/auth0/lock/compare/v11.24.4...v11.24.5) **Fixed** -- [SDK-1738] Remove subtle transition on header element [\#1892](https://github.com/auth0/lock/pull/1892) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-1738] Remove subtle transition on header element [\#1892](https://github.com/auth0/lock/pull/1892) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.24.4](https://github.com/auth0/lock/tree/v11.24.4) (2020-07-02) -[Full Changelog](https://github.com/auth0/lock/compare/v11.24.3...v11.24.4) +[Full Changelog](https://github.com/auth0/lock/compare/v11.24.3...v11.24.4) **Changed** + - [SDK-1756] Add HTML5 novalidate attribute to Lock form to remove native browser validation [\#1890](https://github.com/auth0/lock/pull/1890) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Bump auth0-js to 9.13.3 [\#1889](https://github.com/auth0/lock/pull/1889) ([stevehobbsdev](https://github.com/stevehobbsdev)) - ## [v11.24.3](https://github.com/auth0/lock/tree/v11.24.3) (2020-06-19) -[Full Changelog](https://github.com/auth0/lock/compare/v11.24.2...v11.24.3) +[Full Changelog](https://github.com/auth0/lock/compare/v11.24.2...v11.24.3) **Fixed** + - Allows i18n en lang override [\#1885](https://github.com/auth0/lock/pull/1885) ([davidpatrick](https://github.com/davidpatrick)) - Show the "Can't be blank" message under the password input [\#1882](https://github.com/auth0/lock/pull/1882) ([adamjmcgrath](https://github.com/adamjmcgrath)) **Security** -- [Security] Bump websocket-extensions from 0.1.3 to 0.1.4 [\#1880](https://github.com/auth0/lock/pull/1880) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) +- [Security] Bump websocket-extensions from 0.1.3 to 0.1.4 [\#1880](https://github.com/auth0/lock/pull/1880) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) ## [v11.24.2](https://github.com/auth0/lock/tree/v11.24.2) (2020-06-05) -[Full Changelog](https://github.com/auth0/lock/compare/v11.24.1...v11.24.2) +[Full Changelog](https://github.com/auth0/lock/compare/v11.24.1...v11.24.2) **Fixed** + - [SDK-1556] Apply window height style to root document for Passwordless UI [\#1878](https://github.com/auth0/lock/pull/1878) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Add !hostedLoginPage condition to redirect check [\#1876](https://github.com/auth0/lock/pull/1876) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Header height not updated when Lock dialog is closed and reopened [\#1874](https://github.com/auth0/lock/pull/1874) ([adamjmcgrath](https://github.com/adamjmcgrath)) - z-index needs to be less than the close button to avoid hiding it [\#1872](https://github.com/auth0/lock/pull/1872) ([adamjmcgrath](https://github.com/adamjmcgrath)) - ## [v11.24.1](https://github.com/auth0/lock/tree/v11.24.1) (2020-05-18) -[Full Changelog](https://github.com/auth0/lock/compare/v11.24.0...v11.24.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.24.0...v11.24.1) **Fixed** -- [ESD-6221] Remove CSS variable from header height calculation [\#1867](https://github.com/auth0/lock/pull/1867) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [ESD-6221] Remove CSS variable from header height calculation [\#1867](https://github.com/auth0/lock/pull/1867) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.24.0](https://github.com/auth0/lock/tree/v11.24.0) (2020-05-11) -[Full Changelog](https://github.com/auth0/lock/compare/v11.23.1...v11.24.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.23.1...v11.24.0) **Added** + - Add support for google recaptcha [\#1845](https://github.com/auth0/lock/pull/1845) ([kusold](https://github.com/kusold)) **Fixed** + - Fix header height calculation for large titles [\#1859](https://github.com/auth0/lock/pull/1859) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Typo fix in username.js [\#1857](https://github.com/auth0/lock/pull/1857) ([thduttonuk](https://github.com/thduttonuk)) - Fix send sms error event [\#1856](https://github.com/auth0/lock/pull/1856) ([blankg](https://github.com/blankg)) - ## [v11.23.1](https://github.com/auth0/lock/tree/v11.23.1) (2020-04-20) -[Full Changelog](https://github.com/auth0/lock/compare/v11.23.0...v11.23.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.23.0...v11.23.1) **Fixed** -- [ESD-5299] Bug with the special characters password hint [\#1847](https://github.com/auth0/lock/pull/1847) ([adamjmcgrath](https://github.com/adamjmcgrath)) + +- [ESD-5299] Bug with the special characters password hint [\#1847](https://github.com/auth0/lock/pull/1847) ([adamjmcgrath](https://github.com/adamjmcgrath)) - [ESD-5397] Fix header z-index [\#1846](https://github.com/auth0/lock/pull/1846) ([stevehobbsdev](https://github.com/stevehobbsdev)) **Security** + - Upgraded dependencies from security advisories [\#1848](https://github.com/auth0/lock/pull/1848) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Bump auth0-js from 9.13.1 to 9.13.2 [\#1844](https://github.com/auth0/lock/pull/1844) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) - ## [v11.23.0](https://github.com/auth0/lock/tree/v11.23.0) (2020-04-02) -[Full Changelog](https://github.com/auth0/lock/compare/v11.22.5...v11.23.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.22.5...v11.23.0) **Added** + - Add invalidHint to phoneNumberInput (fix issue #1836) [\#1837](https://github.com/auth0/lock/pull/1837) ([blankg](https://github.com/blankg)) **Fixed** + - [SDK-1413] Re-added scrollbars and fixed password strength popup clip issue [\#1839](https://github.com/auth0/lock/pull/1839) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Add 'social_signup_needs_terms_acception' Japanese translation [\#1835](https://github.com/auth0/lock/pull/1835) ([mag-chang](https://github.com/mag-chang)) @@ -192,584 +520,611 @@ - Bumped auth0-js to 9.13.1 [\#1842](https://github.com/auth0/lock/pull/1842) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.22.5](https://github.com/auth0/lock/tree/v11.22.5) (2020-03-25) -[Full Changelog](https://github.com/auth0/lock/compare/v11.22.4...v11.22.5) +[Full Changelog](https://github.com/auth0/lock/compare/v11.22.4...v11.22.5) **Added** -- add Azerbaijan language [\#1828](https://github.com/auth0/lock/pull/1828) ([Haqverdi](https://github.com/Haqverdi)) +- add Azerbaijan language [\#1828](https://github.com/auth0/lock/pull/1828) ([Haqverdi](https://github.com/Haqverdi)) ## [v11.22.4](https://github.com/auth0/lock/tree/v11.22.4) (2020-03-06) -[Full Changelog](https://github.com/auth0/lock/compare/v11.22.3...v11.22.4) +[Full Changelog](https://github.com/auth0/lock/compare/v11.22.3...v11.22.4) **Fixed** -- [CAUTH-373] do not autologin the user if captcha is required [\#1818](https://github.com/auth0/lock/pull/1818) ([jfromaniello](https://github.com/jfromaniello)) +- [CAUTH-373] do not autologin the user if captcha is required [\#1818](https://github.com/auth0/lock/pull/1818) ([jfromaniello](https://github.com/jfromaniello)) ## [v11.22.3](https://github.com/auth0/lock/tree/v11.22.3) (2020-03-04) -[Full Changelog](https://github.com/auth0/lock/compare/v11.22.2...v11.22.3) +[Full Changelog](https://github.com/auth0/lock/compare/v11.22.2...v11.22.3) **Fixed** -- [SDK-1389] Applied appearance styles for Bootstrap in Safari [\#1815](https://github.com/auth0/lock/pull/1815) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-1389] Applied appearance styles for Bootstrap in Safari [\#1815](https://github.com/auth0/lock/pull/1815) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.22.2](https://github.com/auth0/lock/tree/v11.22.2) (2020-02-20) -[Full Changelog](https://github.com/auth0/lock/compare/v11.22.1...v11.22.2) +[Full Changelog](https://github.com/auth0/lock/compare/v11.22.1...v11.22.2) **Changed** + - Change Sign in with Apple button background to full black [\#1811](https://github.com/auth0/lock/pull/1811) ([stevehobbsdev](https://github.com/stevehobbsdev)) **Fixed** -- Update cs.js - plural adjustments [\#1810](https://github.com/auth0/lock/pull/1810) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Update cs.js - plural adjustments [\#1810](https://github.com/auth0/lock/pull/1810) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.22.1](https://github.com/auth0/lock/tree/v11.22.1) (2020-02-18) -[Full Changelog](https://github.com/auth0/lock/compare/v11.22.0...v11.22.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.22.0...v11.22.1) **Fixed** -- [SDK-1361] Fix missing padding on social buttons [\#1808](https://github.com/auth0/lock/pull/1808) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-1361] Fix missing padding on social buttons [\#1808](https://github.com/auth0/lock/pull/1808) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.22.0](https://github.com/auth0/lock/tree/v11.22.0) (2020-02-17) + [Full Changelog](https://github.com/auth0/lock/compare/v11.21.1...v11.22.0) **Changed** + - [SDK-1373] Added style rules to handle overflow and scroll [\#1803](https://github.com/auth0/lock/pull/1803) ([stevehobbsdev](https://github.com/stevehobbsdev)) - [SDK-1361] Adjust styling for social buttons and Apple compliance [\#1801](https://github.com/auth0/lock/pull/1801) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Return results with signup success callback [\#1799](https://github.com/auth0/lock/pull/1799) ([bstaley](https://github.com/bstaley)) **Fixed** -- [SDK-1374] Email input now uses type="email" [\#1802](https://github.com/auth0/lock/pull/1802) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-1374] Email input now uses type="email" [\#1802](https://github.com/auth0/lock/pull/1802) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.21.1](https://github.com/auth0/lock/tree/v11.21.1) (2020-02-03) -[Full Changelog](https://github.com/auth0/lock/compare/v11.21.0...v11.21.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.21.0...v11.21.1) **Fixed** -- [SDK-1300] Added missing translation keys for 6 EU languages [\#1791](https://github.com/auth0/lock/pull/1791) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-1300] Added missing translation keys for 6 EU languages [\#1791](https://github.com/auth0/lock/pull/1791) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.21.0](https://github.com/auth0/lock/tree/v11.21.0) (2020-01-30) -[Full Changelog](https://github.com/auth0/lock/compare/v11.20.4...v11.21.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.20.4...v11.21.0) **Security** -- Make placeholder text-only, add new placeholderHTML for additionalSignUpFields [\#1788](https://github.com/auth0/lock/pull/1788) ([davidpatrick](https://github.com/davidpatrick)) +- Make placeholder text-only, add new placeholderHTML for additionalSignUpFields [\#1788](https://github.com/auth0/lock/pull/1788) ([davidpatrick](https://github.com/davidpatrick)) ## [v11.20.4](https://github.com/auth0/lock/tree/v11.20.4) (2020-01-29) -[Full Changelog](https://github.com/auth0/lock/compare/v11.20.3...v11.20.4) +[Full Changelog](https://github.com/auth0/lock/compare/v11.20.3...v11.20.4) **Fixed** + - Fix for login button being cut off on some mobile devices [\#1785](https://github.com/auth0/lock/pull/1785) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Emit authorization_error event on passwordless error [\#1784](https://github.com/auth0/lock/pull/1784) ([stevehobbsdev](https://github.com/stevehobbsdev)) - ## [v11.20.3](https://github.com/auth0/lock/tree/v11.20.3) (2020-01-15) -[Full Changelog](https://github.com/auth0/lock/compare/v11.20.2...v11.20.3) +[Full Changelog](https://github.com/auth0/lock/compare/v11.20.2...v11.20.3) **Changed** + - Bumped Auth0.js to 9.12.2 [\#1780](https://github.com/auth0/lock/pull/1780) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Prevent loading overlay from showing when using Sign In With Apple [\#1779](https://github.com/auth0/lock/pull/1779) ([stevehobbsdev](https://github.com/stevehobbsdev)) **Fixed** -- Fix translation pt-PT [\#1776](https://github.com/auth0/lock/pull/1776) ([mario-moura-silva](https://github.com/mario-moura-silva)) +- Fix translation pt-PT [\#1776](https://github.com/auth0/lock/pull/1776) ([mario-moura-silva](https://github.com/mario-moura-silva)) ## [v11.20.2](https://github.com/auth0/lock/tree/v11.20.2) (2020-01-06) -[Full Changelog](https://github.com/auth0/lock/compare/v11.20.1...v11.20.2) +[Full Changelog](https://github.com/auth0/lock/compare/v11.20.1...v11.20.2) **Fixed** -- [CAUTH-277] prevent posting when captcha is required and empty [\#1774](https://github.com/auth0/lock/pull/1774) ([jfromaniello](https://github.com/jfromaniello)) +- [CAUTH-277] prevent posting when captcha is required and empty [\#1774](https://github.com/auth0/lock/pull/1774) ([jfromaniello](https://github.com/jfromaniello)) ## [v11.20.1](https://github.com/auth0/lock/tree/v11.20.1) (2019-12-20) -[Full Changelog](https://github.com/auth0/lock/compare/v11.20.0...v11.20.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.20.0...v11.20.1) **Fixed** -- Set the default token validation leeway to 60 sec [\#1770](https://github.com/auth0/lock/pull/1770) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Set the default token validation leeway to 60 sec [\#1770](https://github.com/auth0/lock/pull/1770) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.20.0](https://github.com/auth0/lock/tree/v11.20.0) (2019-12-16) -[Full Changelog](https://github.com/auth0/lock/compare/v11.19.0...v11.20.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.19.0...v11.20.0) **Added** + - add captcha support [\#1765](https://github.com/auth0/lock/pull/1765) ([jfromaniello](https://github.com/jfromaniello)) **Security** -- [SDK-980] Bumped auth0.js to 9.12.0 [\#1767](https://github.com/auth0/lock/pull/1767) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- [SDK-980] Bumped auth0.js to 9.12.0 [\#1767](https://github.com/auth0/lock/pull/1767) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.19.0](https://github.com/auth0/lock/tree/v11.19.0) (2019-12-04) -[Full Changelog](https://github.com/auth0/lock/compare/v11.18.1...v11.19.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.18.1...v11.19.0) **Added** + - New Feature: Signup Success Event [\#1754](https://github.com/auth0/lock/pull/1754) ([fostergn](https://github.com/fostergn)) **Fixed** + - [SDK-1191] Lock social buttons now render as links instead of buttons [\#1760](https://github.com/auth0/lock/pull/1760) ([stevehobbsdev](https://github.com/stevehobbsdev)) - [SDK-1141] Altered readme samples to remove ref to localstorage [\#1759](https://github.com/auth0/lock/pull/1759) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Applied overflow style only on mobile views [\#1758](https://github.com/auth0/lock/pull/1758) ([stevehobbsdev](https://github.com/stevehobbsdev)) - Bugfix for WebExtension [\#1750](https://github.com/auth0/lock/pull/1750) ([STK913](https://github.com/STK913)) - ## [v11.18.1](https://github.com/auth0/lock/tree/v11.18.1) (2019-10-28) -[Full Changelog](https://github.com/auth0/lock/compare/v11.18.0...v11.18.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.18.0...v11.18.1) **Added** + - added hungarian transalation for social_signup_needs_terms_acception [\#1744](https://github.com/auth0/lock/pull/1744) ([smatyas](https://github.com/smatyas)) - Add a Lock event 'sso login' [\#1742](https://github.com/auth0/lock/pull/1742) ([countergram](https://github.com/countergram)) - fix: Add missing property for finnish translation [\#1740](https://github.com/auth0/lock/pull/1740) ([petetnt](https://github.com/petetnt)) **Fixed** -- Reset .auth0-lock-form display to 'initial' for iPhone [\#1745](https://github.com/auth0/lock/pull/1745) ([stevehobbsdev](https://github.com/stevehobbsdev)) +- Reset .auth0-lock-form display to 'initial' for iPhone [\#1745](https://github.com/auth0/lock/pull/1745) ([stevehobbsdev](https://github.com/stevehobbsdev)) ## [v11.18.0](https://github.com/auth0/lock/tree/v11.18.0) (2019-10-10) -[Full Changelog](https://github.com/auth0/lock/compare/v11.17.3...v11.18.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.17.3...v11.18.0) **Changed** + - Relaxing the email validation [\#1735](https://github.com/auth0/lock/pull/1735) ([luisrudge](https://github.com/luisrudge)) - Fix social button interactions when terms have not been accepted [\#1733](https://github.com/auth0/lock/pull/1733) ([luisrudge](https://github.com/luisrudge)) **Fixed** -- Map password_expired to password_change_required [\#1730](https://github.com/auth0/lock/pull/1730) ([luisrudge](https://github.com/luisrudge)) +- Map password_expired to password_change_required [\#1730](https://github.com/auth0/lock/pull/1730) ([luisrudge](https://github.com/luisrudge)) ## [v11.17.3](https://github.com/auth0/lock/tree/v11.17.3) (2019-10-03) -[Full Changelog](https://github.com/auth0/lock/compare/v11.17.2...v11.17.3) +[Full Changelog](https://github.com/auth0/lock/compare/v11.17.2...v11.17.3) **Fixed** + - Fix Title cropping and password instructions tooltip [\#1728](https://github.com/auth0/lock/pull/1728) ([thisis-Shitanshu](https://github.com/thisis-Shitanshu)) - Fix pt language issue [\#1726](https://github.com/auth0/lock/pull/1726) ([jogee](https://github.com/jogee)) - ## [v11.17.2](https://github.com/auth0/lock/tree/v11.17.2) (2019-08-08) -[Full Changelog](https://github.com/auth0/lock/compare/v11.17.1...v11.17.2) - +[Full Changelog](https://github.com/auth0/lock/compare/v11.17.1...v11.17.2) ## [v11.17.1](https://github.com/auth0/lock/tree/v11.17.1) (2019-07-23) + [Full Changelog](https://github.com/auth0/lock/compare/v11.17.0...v11.17.1) **Fixed** - Use cdn-uploader from NPM. - ## [v11.17.0](https://github.com/auth0/lock/tree/v11.17.0) (2019-07-15) -[Full Changelog](https://github.com/auth0/lock/compare/v11.16.3...v11.17.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.16.3...v11.17.0) **Added** + - Add validation to new root profile attributes [\#1657](https://github.com/auth0/lock/pull/1657) ([luisrudge](https://github.com/luisrudge)) - Add support for signup with root level attributes [\#1656](https://github.com/auth0/lock/pull/1656) ([luisrudge](https://github.com/luisrudge)) - ## [v11.16.3](https://github.com/auth0/lock/tree/v11.16.3) (2019-06-11) -[Full Changelog](https://github.com/auth0/lock/compare/v11.16.2...v11.16.3) +[Full Changelog](https://github.com/auth0/lock/compare/v11.16.2...v11.16.3) **Added** + - Add support for Apple strategy [\#1674](https://github.com/auth0/lock/pull/1674) ([astanciu](https://github.com/astanciu)) **Fixed** -- Fix password policy when using tenant connections [\#1664](https://github.com/auth0/lock/pull/1664) ([luisrudge](https://github.com/luisrudge)) +- Fix password policy when using tenant connections [\#1664](https://github.com/auth0/lock/pull/1664) ([luisrudge](https://github.com/luisrudge)) ## [v11.16.2](https://github.com/auth0/lock/tree/v11.16.2) (2019-06-03) + [Full Changelog](https://github.com/auth0/lock/compare/v11.16.1...v11.16.2) **Fixed** - Fixed telemetry - ## [v11.16.1](https://github.com/auth0/lock/tree/v11.16.1) (2019-06-03) -[Full Changelog](https://github.com/auth0/lock/compare/v11.16.0...v11.16.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.16.0...v11.16.1) **Added** + - Add error message for too_many_requests [\#1655](https://github.com/auth0/lock/pull/1655) ([luisrudge](https://github.com/luisrudge)) - Add translation for Bulgarian (bg). [\#1652](https://github.com/auth0/lock/pull/1652) ([alex-mo](https://github.com/alex-mo)) **Fixed** + - Prevent form submit when password is empty [\#1654](https://github.com/auth0/lock/pull/1654) ([luisrudge](https://github.com/luisrudge)) - Fix destroying lock instance [\#1653](https://github.com/auth0/lock/pull/1653) ([luisrudge](https://github.com/luisrudge)) - ## [v11.16.0](https://github.com/auth0/lock/tree/v11.16.0) (2019-05-06) -[Full Changelog](https://github.com/auth0/lock/compare/v11.15.0...v11.16.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.15.0...v11.16.0) **Changed** + - Remove socialButtonStyle option to use small icons [\#1637](https://github.com/auth0/lock/pull/1637) ([luisrudge](https://github.com/luisrudge)) -*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.* +_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._ **Fixed** -- Fix IE11 height [\#1641](https://github.com/auth0/lock/pull/1641) ([luisrudge](https://github.com/luisrudge)) +- Fix IE11 height [\#1641](https://github.com/auth0/lock/pull/1641) ([luisrudge](https://github.com/luisrudge)) ## [v11.15.0](https://github.com/auth0/lock/tree/v11.15.0) (2019-04-16) -[Full Changelog](https://github.com/auth0/lock/compare/v11.14.1...v11.15.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.14.1...v11.15.0) **Changed** + - Changes german translation of 'sign up' from 'Anmelden' to 'Registrieren; [\#1627](https://github.com/auth0/lock/pull/1627) ([PapaMufflon](https://github.com/PapaMufflon)) - Update telemetry format and rules [\#1624](https://github.com/auth0/lock/pull/1624) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fix layout when using big string for terms [\#1631](https://github.com/auth0/lock/pull/1631) ([luisrudge](https://github.com/luisrudge)) - Use new facebook icon [\#1630](https://github.com/auth0/lock/pull/1630) ([luisrudge](https://github.com/luisrudge)) - Added `login_required` to unhandled authorization errors [\#1629](https://github.com/auth0/lock/pull/1629) ([benhamiltonpro](https://github.com/benhamiltonpro)) - Fix error message overflow [\#1628](https://github.com/auth0/lock/pull/1628) ([luisrudge](https://github.com/luisrudge)) - ## [v11.14.1](https://github.com/auth0/lock/tree/v11.14.1) (2019-03-18) -[Full Changelog](https://github.com/auth0/lock/compare/v11.14.0...v11.14.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.14.0...v11.14.1) **Fixed** + - Fix/avatar crop header mobile [\#1621](https://github.com/auth0/lock/pull/1621) ([luisrudge](https://github.com/luisrudge)) - Improve greek translation [\#1614](https://github.com/auth0/lock/pull/1614) ([esarafianou](https://github.com/esarafianou)) - Upgrade Auth0.js to 9.10.1 - ## [v11.14.0](https://github.com/auth0/lock/tree/v11.14.0) (2019-01-30) -[Full Changelog](https://github.com/auth0/lock/compare/v11.13.2...v11.14.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.13.2...v11.14.0) **Changed** -- Upgrade Auth0.js to trim email, username and phoneNumber on every request [\#1596](https://github.com/auth0/lock/pull/1596) ([luisrudge](https://github.com/luisrudge)) +- Upgrade Auth0.js to trim email, username and phoneNumber on every request [\#1596](https://github.com/auth0/lock/pull/1596) ([luisrudge](https://github.com/luisrudge)) ## [v11.13.2](https://github.com/auth0/lock/tree/v11.13.2) (2019-01-28) -[Full Changelog](https://github.com/auth0/lock/compare/v11.13.1...v11.13.2) +[Full Changelog](https://github.com/auth0/lock/compare/v11.13.1...v11.13.2) **Fixed** -- Fix lock center position with scroll across browsers [\#1594](https://github.com/auth0/lock/pull/1594) ([luisrudge](https://github.com/luisrudge)) +- Fix lock center position with scroll across browsers [\#1594](https://github.com/auth0/lock/pull/1594) ([luisrudge](https://github.com/luisrudge)) ## [v11.13.1](https://github.com/auth0/lock/tree/v11.13.1) (2019-01-23) -[Full Changelog](https://github.com/auth0/lock/compare/v11.13.0...v11.13.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.13.0...v11.13.1) **Fixed** -- Upgrade Auth0.js with fix for storage inside the Hosted Login Page [\#1592](https://github.com/auth0/lock/pull/1592) ([luisrudge](https://github.com/luisrudge)) +- Upgrade Auth0.js with fix for storage inside the Hosted Login Page [\#1592](https://github.com/auth0/lock/pull/1592) ([luisrudge](https://github.com/luisrudge)) ## [v11.13.0](https://github.com/auth0/lock/tree/v11.13.0) (2019-01-15) -[Full Changelog](https://github.com/auth0/lock/compare/v11.12.1...v11.13.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.12.1...v11.13.0) **Added** + - Adding terms for passwordless [\#1424](https://github.com/auth0/lock/pull/1424) ([luisrudge](https://github.com/luisrudge)) **Changed** + - Don't use storage when inside the Universal Login Page (Auth0.js update) [\#1587](https://github.com/auth0/lock/pull/1587) ([luisrudge](https://github.com/luisrudge)) **Fixed** -- Fixed missing scroll issue for sign up [\#1566](https://github.com/auth0/lock/pull/1566) ([degrammer](https://github.com/degrammer)) +- Fixed missing scroll issue for sign up [\#1566](https://github.com/auth0/lock/pull/1566) ([degrammer](https://github.com/degrammer)) ## [v11.12.1](https://github.com/auth0/lock/tree/v11.12.1) (2018-11-23) -[Full Changelog](https://github.com/auth0/lock/compare/v11.12.0...v11.12.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.12.0...v11.12.1) **Fixed** -- Fix `lock is undefined` error in non-redirect scenarios [\#1557](https://github.com/auth0/lock/pull/1557) ([luisrudge](https://github.com/luisrudge)) +- Fix `lock is undefined` error in non-redirect scenarios [\#1557](https://github.com/auth0/lock/pull/1557) ([luisrudge](https://github.com/luisrudge)) ## [v11.12.0](https://github.com/auth0/lock/tree/v11.12.0) (2018-11-19) -[Full Changelog](https://github.com/auth0/lock/compare/v11.11.0...v11.12.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.11.0...v11.12.0) **Added** + - Add ids to inputs and buttons [\#1517](https://github.com/auth0/lock/pull/1517) ([tingaloo](https://github.com/tingaloo)) - Add `showTerms` option [\#1485](https://github.com/auth0/lock/pull/1485) ([luisrudge](https://github.com/luisrudge)) **Changed** + - Trim auth params before sending to the API (not while typing) [\#1546](https://github.com/auth0/lock/pull/1546) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fix padding in all screens [\#1547](https://github.com/auth0/lock/pull/1547) ([luisrudge](https://github.com/luisrudge)) - Fix IE10 script error [\#1542](https://github.com/auth0/lock/pull/1542) ([luisrudge](https://github.com/luisrudge)) - Fix mobile styles using different heights [\#1539](https://github.com/auth0/lock/pull/1539) ([luisrudge](https://github.com/luisrudge)) - ## [v11.11.0](https://github.com/auth0/lock/tree/v11.11.0) (2018-10-23) -[Full Changelog](https://github.com/auth0/lock/compare/v11.10.0...v11.11.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.10.0...v11.11.0) **Added** + - Add prefill support to Auth0LockPasswordless [\#1505](https://github.com/auth0/lock/pull/1505) ([luisrudge](https://github.com/luisrudge)) - Add `ariaLabel` option for custom fields [\#1492](https://github.com/auth0/lock/pull/1492) ([Splact](https://github.com/Splact)) **Fixed** + - Fix google button styles according to google's guidelines [\#1512](https://github.com/auth0/lock/pull/1512) ([luisrudge](https://github.com/luisrudge)) - [Sustainment] Fixed Reset Password Avatar/Enterprise Issue [\#1504](https://github.com/auth0/lock/pull/1504) ([cocojoe](https://github.com/cocojoe)) - Remove aria-describedby on missing ref [\#1497](https://github.com/auth0/lock/pull/1497) ([Splact](https://github.com/Splact)) - ## [v11.10.0](https://github.com/auth0/lock/tree/v11.10.0) (2018-09-27) + [Full Changelog](https://github.com/auth0/lock/compare/v11.9.1...v11.10.0) **Changed** -- Upgrade Auth0.js to use cookies instead of localStorage by default: [Read more](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v980-2018-09-26) +- Upgrade Auth0.js to use cookies instead of localStorage by default: [Read more](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v980-2018-09-26) ## [v11.9.1](https://github.com/auth0/lock/tree/v11.9.1) (2018-09-10) -[Full Changelog](https://github.com/auth0/lock/compare/v11.9.0...v11.9.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.9.0...v11.9.1) **Fixed** -- Use span for icon buttons [\#1478](https://github.com/auth0/lock/pull/1478) ([andrew-me](https://github.com/andrew-me)) +- Use span for icon buttons [\#1478](https://github.com/auth0/lock/pull/1478) ([andrew-me](https://github.com/andrew-me)) ## [v11.9.0](https://github.com/auth0/lock/tree/v11.9.0) (2018-08-28) -[Full Changelog](https://github.com/auth0/lock/compare/v11.8.1...v11.9.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.8.1...v11.9.0) **Added** + - Support new minimum password length parameter [\#1472](https://github.com/auth0/lock/pull/1472) ([luisrudge](https://github.com/luisrudge)) - Improve accessibility [\#1471](https://github.com/auth0/lock/pull/1471) ([andrew-me](https://github.com/andrew-me)) - Add a new type of additionalSignUpField: hidden [\#1459](https://github.com/auth0/lock/pull/1459) ([luisrudge](https://github.com/luisrudge)) **Fixed** -- Fixed login_hint in some enterprise authorize call scenarios [\#1460](https://github.com/auth0/lock/pull/1460) ([cocojoe](https://github.com/cocojoe)) +- Fixed login_hint in some enterprise authorize call scenarios [\#1460](https://github.com/auth0/lock/pull/1460) ([cocojoe](https://github.com/cocojoe)) ## [v11.8.1](https://github.com/auth0/lock/tree/v11.8.1) (2018-07-30) -[Full Changelog](https://github.com/auth0/lock/compare/v11.8.0...v11.8.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.8.0...v11.8.1) **Fixed** + - Fix/sign up title inconsistenty [\#1457](https://github.com/auth0/lock/pull/1457) ([luisrudge](https://github.com/luisrudge)) - Fix wrong autoComplete value in password_input [\#1456](https://github.com/auth0/lock/pull/1456) ([luisrudge](https://github.com/luisrudge)) - Fix crash when showing lock for the second time with custom select input [\#1448](https://github.com/auth0/lock/pull/1448) ([luisrudge](https://github.com/luisrudge)) - Moving the PasswordStrength component to below the password input [\#1444](https://github.com/auth0/lock/pull/1444) ([luisrudge](https://github.com/luisrudge)) - ## [v11.8.0](https://github.com/auth0/lock/tree/v11.8.0) (2018-07-24) -[Full Changelog](https://github.com/auth0/lock/compare/v11.7.2...v11.8.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.7.2...v11.8.0) **Added** + - Add allowPasswordAutocomplete option [\#1419](https://github.com/auth0/lock/pull/1419) ([jshado1](https://github.com/jshado1)) **Changed** + - Upgrade auth0.js to 9.7.3 [\#1442](https://github.com/auth0/lock/pull/1442) ([luisrudge](https://github.com/luisrudge)) **Fixed** -- Fix Configuration URL when using __tenantInfo and a baseConfigurationURL [\#1425](https://github.com/auth0/lock/pull/1425) ([lbalmaceda](https://github.com/lbalmaceda)) + +- Fix Configuration URL when using \_\_tenantInfo and a baseConfigurationURL [\#1425](https://github.com/auth0/lock/pull/1425) ([lbalmaceda](https://github.com/lbalmaceda)) - Fix SSO screen not showing in some cases [\#1415](https://github.com/auth0/lock/pull/1415) ([luisrudge](https://github.com/luisrudge)) - In SSO mode, hide the password input instead of removing it from the DOM [\#1407](https://github.com/auth0/lock/pull/1407) ([luisrudge](https://github.com/luisrudge)) - ## [v11.7.2](https://github.com/auth0/lock/tree/v11.7.2) (2018-06-07) -[Full Changelog](https://github.com/auth0/lock/compare/v11.7.1...v11.7.2) +[Full Changelog](https://github.com/auth0/lock/compare/v11.7.1...v11.7.2) **Added** + - Added an i18n file for the Norwegian Nynorsk language [\#1398](https://github.com/auth0/lock/pull/1398) ([cjrorvik](https://github.com/cjrorvik)) **Fixed** + - SSO: Fallback to email if the username field is empty [\#1400](https://github.com/auth0/lock/pull/1400) ([sandrinodimattia](https://github.com/sandrinodimattia)) - Fixed some typos and corrected some mistakes in the Norwegian Bokmaal [\#1399](https://github.com/auth0/lock/pull/1399) ([cjrorvik](https://github.com/cjrorvik)) - ## [v11.7.1](https://github.com/auth0/lock/tree/v11.7.1) (2018-06-01) -[Full Changelog](https://github.com/auth0/lock/compare/v11.7.0...v11.7.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.7.0...v11.7.1) **Fixed** -- Fix IE submit button display:initial issue [\#1394](https://github.com/auth0/lock/pull/1394) ([luisrudge](https://github.com/luisrudge)) +- Fix IE submit button display:initial issue [\#1394](https://github.com/auth0/lock/pull/1394) ([luisrudge](https://github.com/luisrudge)) ## [v11.7.0](https://github.com/auth0/lock/tree/v11.7.0) (2018-05-28) -[Full Changelog](https://github.com/auth0/lock/compare/v11.6.1...v11.7.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.6.1...v11.7.0) **Fixed** + - Display error for all enterprise connections in the reset password screen [\#1384](https://github.com/auth0/lock/pull/1384) ([luisrudge](https://github.com/luisrudge)) - Hide password strength message when the password is valid [\#1382](https://github.com/auth0/lock/pull/1382) ([luisrudge](https://github.com/luisrudge)) - Fixed Turkish translation [\#1379](https://github.com/auth0/lock/pull/1379) ([saltukalakus](https://github.com/saltukalakus)) - Fix IE default redirect url [\#1373](https://github.com/auth0/lock/pull/1373) ([luisrudge](https://github.com/luisrudge)) - ## [v11.6.1](https://github.com/auth0/lock/tree/v11.6.1) (2018-05-02) + [Full Changelog](https://github.com/auth0/lock/compare/v11.6.0...v11.6.1) **Fixed** -- Fix rendering issue on iOS devices [\#1365](https://github.com/auth0/lock/pull/1365) ([luisrudge](https://github.com/luisrudge)) +- Fix rendering issue on iOS devices [\#1365](https://github.com/auth0/lock/pull/1365) ([luisrudge](https://github.com/luisrudge)) ## [v11.6.0](https://github.com/auth0/lock/tree/v11.6.0) (2018-04-24) -[Full Changelog](https://github.com/auth0/lock/compare/v11.5.2...v11.6.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.5.2...v11.6.0) **Added** + - Add signup error to valid events [\#1329](https://github.com/auth0/lock/pull/1329) ([yveswehrli](https://github.com/yveswehrli)) **Changed** + - Upgrade auth0-js to 9.5.0. See auth0-js' changelog [here](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v950-2018-04-24). -**Fixed** + **Fixed** - Show spinner when doing quick auth [\#1346](https://github.com/auth0/lock/pull/1346) ([luisrudge](https://github.com/luisrudge)) - Fix danish translation [\#1338](https://github.com/auth0/lock/pull/1338) ([luisrudge](https://github.com/luisrudge)) - Fix getSSOData not sending custom nonce/state [\#1333](https://github.com/auth0/lock/pull/1333) ([luisrudge](https://github.com/luisrudge)) - ## [v11.5.2](https://github.com/auth0/lock/tree/v11.5.2) (2018-03-28) -[Full Changelog](https://github.com/auth0/lock/compare/v11.5.1...v11.5.2) +[Full Changelog](https://github.com/auth0/lock/compare/v11.5.1...v11.5.2) **Added** -- Add jwksURI override option [\#1321](https://github.com/auth0/lock/pull/1321) ([luisrudge](https://github.com/luisrudge)) +- Add jwksURI override option [\#1321](https://github.com/auth0/lock/pull/1321) ([luisrudge](https://github.com/luisrudge)) ## [v11.5.1](https://github.com/auth0/lock/tree/v11.5.1) (2018-03-22) -[Full Changelog](https://github.com/auth0/lock/compare/v11.5.0...v11.5.1) - +[Full Changelog](https://github.com/auth0/lock/compare/v11.5.0...v11.5.1) ## [v11.5.0](https://github.com/auth0/lock/tree/v11.5.0) (2018-03-22) -[Full Changelog](https://github.com/auth0/lock/compare/v11.4.0...v11.5.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.4.0...v11.5.0) **Changed** + - updating auth0-js with impersonation and access token validation changes [\#1308](https://github.com/auth0/lock/pull/1308) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fix inconsistent state assignment when parsing a hash [\#1309](https://github.com/auth0/lock/pull/1309) ([luisrudge](https://github.com/luisrudge)) - Fixed German translations [\#1307](https://github.com/auth0/lock/pull/1307) ([roschaefer](https://github.com/roschaefer)) - Fixing IE lack of support for `includes` [\#1298](https://github.com/auth0/lock/pull/1298) ([luisrudge](https://github.com/luisrudge)) - Fix Japanese translations [\#1295](https://github.com/auth0/lock/pull/1295) ([hiro1107](https://github.com/hiro1107)) - ## [v11.4.0](https://github.com/auth0/lock/tree/v11.4.0) (2018-03-12) -[Full Changelog](https://github.com/auth0/lock/compare/v11.3.1...v11.4.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.3.1...v11.4.0) **Added** + - Update auth0.js and add flag to enable impersonation [\#1290](https://github.com/auth0/lock/pull/1290) ([luisrudge](https://github.com/luisrudge)) **Changed** + - Making HRD work in signup page and showing an error when HRD is detected in the forgot password page [\#1278](https://github.com/auth0/lock/pull/1278) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fix inconsistent screen title [\#1288](https://github.com/auth0/lock/pull/1288) ([luisrudge](https://github.com/luisrudge)) - Always remove spaces from email and username [\#1280](https://github.com/auth0/lock/pull/1280) ([luisrudge](https://github.com/luisrudge)) - ## [v11.3.1](https://github.com/auth0/lock/tree/v11.3.1) (2018-02-28) -[Full Changelog](https://github.com/auth0/lock/compare/v11.3.0...v11.3.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.3.0...v11.3.1) **Fixed** -- Add enterprise mapping to the auth0-oidc strategy [\#1275](https://github.com/auth0/lock/pull/1275) ([luisrudge](https://github.com/luisrudge)) +- Add enterprise mapping to the auth0-oidc strategy [\#1275](https://github.com/auth0/lock/pull/1275) ([luisrudge](https://github.com/luisrudge)) ## [v11.3.0](https://github.com/auth0/lock/tree/v11.3.0) (2018-02-22) -[Full Changelog](https://github.com/auth0/lock/compare/v11.2.3...v11.3.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.2.3...v11.3.0) **Fixed** + - Fix Lock Passwordless feature parity (events and quick auth screen) [\#1267](https://github.com/auth0/lock/pull/1267) ([luisrudge](https://github.com/luisrudge)) - Removing legacy COA mapping + fixing access_denied mapping [\#1266](https://github.com/auth0/lock/pull/1266) ([luisrudge](https://github.com/luisrudge)) - Only call getSSOData when rememberLastLogin is true [\#1265](https://github.com/auth0/lock/pull/1265) ([luisrudge](https://github.com/luisrudge)) - Upgrade auth0-js to 9.3.0. See auth0-js' changelog [here](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v930-2018-02-22). - - ## [v11.2.3](https://github.com/auth0/lock/tree/v11.2.3) (2018-02-08) -[Full Changelog](https://github.com/auth0/lock/compare/v11.2.2...v11.2.3) +[Full Changelog](https://github.com/auth0/lock/compare/v11.2.2...v11.2.3) **Fixed** + - Fixing Auth0LockPasswordless export [\#1259](https://github.com/auth0/lock/pull/1259) ([luisrudge](https://github.com/luisrudge)) - Fix sso warning [\#1258](https://github.com/auth0/lock/pull/1258) ([luisrudge](https://github.com/luisrudge)) - ## [v11.2.2](https://github.com/auth0/lock/tree/v11.2.2) (2018-02-06) -[Full Changelog](https://github.com/auth0/lock/compare/v11.2.1...v11.2.2) +[Full Changelog](https://github.com/auth0/lock/compare/v11.2.1...v11.2.2) **Fixed** -- Upgrade a0js to fix popup mode with passwordless [\#1251](https://github.com/auth0/lock/pull/1251) ([luisrudge](https://github.com/luisrudge)) +- Upgrade a0js to fix popup mode with passwordless [\#1251](https://github.com/auth0/lock/pull/1251) ([luisrudge](https://github.com/luisrudge)) ## [v11.2.1](https://github.com/auth0/lock/tree/v11.2.1) (2018-02-02) -[Full Changelog](https://github.com/auth0/lock/compare/v11.2.0...v11.2.1) +[Full Changelog](https://github.com/auth0/lock/compare/v11.2.0...v11.2.1) **Fixed** -- DIsable HRD check for passwordless connections [\#1248](https://github.com/auth0/lock/pull/1248) ([luisrudge](https://github.com/luisrudge)) +- DIsable HRD check for passwordless connections [\#1248](https://github.com/auth0/lock/pull/1248) ([luisrudge](https://github.com/luisrudge)) ## [v11.2.0](https://github.com/auth0/lock/tree/v11.2.0) (2018-02-02) -[Full Changelog](https://github.com/auth0/lock/compare/v11.1.3...v11.2.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.1.3...v11.2.0) **Changed** + - call /ssodata when inside the universal login page [\#1245](https://github.com/auth0/lock/pull/1245) ([luisrudge](https://github.com/luisrudge)) - Handling embedded and universal login in the same application [\#1243](https://github.com/auth0/lock/pull/1243) ([luisrudge](https://github.com/luisrudge)) - ## [v11.1.3](https://github.com/auth0/lock/tree/v11.1.3) (2018-01-29) + [Full Changelog](https://github.com/auth0/lock/compare/v11.1.2...v11.1.3) **Changed** -- Update auth0.js [auth0.js changelog](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v913-2018-01-29) - +- Update auth0.js [auth0.js changelog](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v913-2018-01-29) ## [v11.1.2](https://github.com/auth0/lock/tree/v11.1.2) (2018-01-26) + [Full Changelog](https://github.com/auth0/lock/compare/v11.1.1...v11.1.2) **Changed** -- Update auth0.js [auth0.js changelog](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v912-2018-01-26) +- Update auth0.js [auth0.js changelog](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v912-2018-01-26) ## [v11.1.1](https://github.com/auth0/lock/tree/v11.1.1) (2018-01-24) + [Full Changelog](https://github.com/auth0/lock/compare/v11.1.0...v11.1.1) **Changed** -- Update auth0.js [auth0.js changelog](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v911-2018-01-24) +- Update auth0.js [auth0.js changelog](https://github.com/auth0/auth0.js/blob/master/CHANGELOG.md#v911-2018-01-24) ## [v11.1.0](https://github.com/auth0/lock/tree/v11.1.0) (2018-01-16) -[Full Changelog](https://github.com/auth0/lock/compare/v11.0.1...v11.1.0) +[Full Changelog](https://github.com/auth0/lock/compare/v11.0.1...v11.1.0) **Changed** -- Update auth0.js [\#1225](https://github.com/auth0/lock/pull/1225) ([luisrudge](https://github.com/luisrudge)) +- Update auth0.js [\#1225](https://github.com/auth0/lock/pull/1225) ([luisrudge](https://github.com/luisrudge)) ## [v11.0.0](https://github.com/auth0/lock/tree/v11.0.0) (2017-12-21) + [Full Changelog](https://github.com/auth0/lock/compare/v10.23.0...v11.0.0) Lock v11 is designed for embedded login scenarios and **is not supported in centralized login scenarios** (i.e. Hosted Login Pages). You need to keep using Lock v10 in the Hosted Login Page. -We wrote a [Migration Guide](https://auth0.com/docs/libraries/lock/v11/migration-guide) to make upgrading your app easy. +We wrote a [Migration Guide](https://auth0.com/docs/libraries/lock/v11/migration-guide) to make upgrading your app easy. **Breaking change** -`lock.getProfile` now expects an access\_token as the first parameter. You'll need to update your code to change the parameter sent (v10 expected an id_token). +`lock.getProfile` now expects an access_token as the first parameter. You'll need to update your code to change the parameter sent (v10 expected an id_token). **Removed** The `oidcConformant` flag was used to force Lock v10 to not call legacy endpoints. Lock v11 never uses legacy endpoint so the flag is not needed anymore. If specified, it will be ignored. @@ -778,27 +1133,29 @@ The `oidcConformant` flag was used to force Lock v10 to not call legacy endpoint Lock v11 default the `scope` parameter to `openid profile email`. This is to make the 'Last Logged in With' window work. ## [v10.23.1](https://github.com/auth0/lock/tree/v10.23.1) (2017-10-12) -[Full Changelog](https://github.com/auth0/lock/compare/v10.23.0...v10.23.1) +[Full Changelog](https://github.com/auth0/lock/compare/v10.23.0...v10.23.1) **Fixed** -- Using correct suffix for animation [\#1146](https://github.com/auth0/lock/pull/1146) ([luisrudge](https://github.com/luisrudge)) +- Using correct suffix for animation [\#1146](https://github.com/auth0/lock/pull/1146) ([luisrudge](https://github.com/luisrudge)) ## [v10.23.0](https://github.com/auth0/lock/tree/v10.23.0) (2017-10-12) -[Full Changelog](https://github.com/auth0/lock/compare/v10.22.0...v10.23.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.22.0...v10.23.0) **Changed** + - Pinning react version 15.6.2 [\#1142](https://github.com/auth0/lock/pull/1142) ([luisrudge](https://github.com/luisrudge)) - upgrade auth0.js [\#1137](https://github.com/auth0/lock/pull/1137) ([luisrudge](https://github.com/luisrudge)) - Upgrade react version [\#1135](https://github.com/auth0/lock/pull/1135) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fix defaultUrl sending hash content [\#1132](https://github.com/auth0/lock/pull/1132) ([luisrudge](https://github.com/luisrudge)) +### ** NOTICE ** -### ** NOTICE ** We're trying to figure it out how to help customers that want to upgrade to react@16. The ideal would be to move react and react-dom to peerDependencies, but this would be a breaking change for most of our customers, so we're thinking this through. In the meantime, react@16 works just fine with this codebase. You'll just have to bundle both versions if you're not using yarn. If you are using yarn, however, you can use the `resolutions` field and pin react@16 to your repo. @@ -827,152 +1184,166 @@ In the meantime, react@16 works just fine with this codebase. You'll just have t } ``` - ## [v10.22.0](https://github.com/auth0/lock/tree/v10.22.0) (2017-09-26) -[Full Changelog](https://github.com/auth0/lock/compare/v10.21.1...v10.22.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.21.1...v10.22.0) **Added** + - Adding oidcConformant readme entry [\#1119](https://github.com/auth0/lock/pull/1119) ([luisrudge](https://github.com/luisrudge)) **Changed** -- Make cross origin authentication the default in OIDC mode [\#1124](https://github.com/auth0/lock/pull/1124) ([luisrudge](https://github.com/luisrudge)) +- Make cross origin authentication the default in OIDC mode [\#1124](https://github.com/auth0/lock/pull/1124) ([luisrudge](https://github.com/luisrudge)) ## [v10.21.1](https://github.com/auth0/lock/tree/v10.21.1) (2017-09-21) -[Full Changelog](https://github.com/auth0/lock/compare/v10.21.0...v10.21.1) +[Full Changelog](https://github.com/auth0/lock/compare/v10.21.0...v10.21.1) **Fixed** -- Fix resolved connection not being a Map object [\#1116](https://github.com/auth0/lock/pull/1116) ([luisrudge](https://github.com/luisrudge)) +- Fix resolved connection not being a Map object [\#1116](https://github.com/auth0/lock/pull/1116) ([luisrudge](https://github.com/luisrudge)) ## [v10.21.0](https://github.com/auth0/lock/tree/v10.21.0) (2017-09-21) -[Full Changelog](https://github.com/auth0/lock/compare/v10.20.0...v10.21.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.20.0...v10.21.0) **Added** + - Add Estonian Translations [\#1099](https://github.com/auth0/lock/pull/1099) ([meikoudras](https://github.com/meikoudras)) **Changed** + - Changed the connectionResolver to run onSubmit instead of onBlur [\#1113](https://github.com/auth0/lock/pull/1113) ([luisrudge](https://github.com/luisrudge)) - Change translate for loginAtLabel [\#1110](https://github.com/auth0/lock/pull/1110) ([radu-carmina](https://github.com/radu-carmina)) **Fixed** + - Use resolvedConnection where available [\#1111](https://github.com/auth0/lock/pull/1111) ([lukevmorris](https://github.com/lukevmorris)) - Fix a few svg errors when used with global css rule [\#1103](https://github.com/auth0/lock/pull/1103) ([luisrudge](https://github.com/luisrudge)) - Links with # should use javascript:void(0) [\#1102](https://github.com/auth0/lock/pull/1102) ([luisrudge](https://github.com/luisrudge)) - Improve Danish translation [\#1097](https://github.com/auth0/lock/pull/1097) ([havgry](https://github.com/havgry)) - Fixed translations for Romanian and Slovenian [\#1092](https://github.com/auth0/lock/pull/1092) ([AdrianSima](https://github.com/AdrianSima)) - ## [v10.20.0](https://github.com/auth0/lock/tree/v10.20.0) (2017-08-11) -[Full Changelog](https://github.com/auth0/lock/compare/v10.19.0...v10.20.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.19.0...v10.20.0) **Added** + - Add Romanian translations [\#1074](https://github.com/auth0/lock/pull/1074) ([jogee](https://github.com/jogee)) - Add Slovenian translations [\#1073](https://github.com/auth0/lock/pull/1073) ([jogee](https://github.com/jogee)) **Changed** + - Update username allowed chars regex [\#1079](https://github.com/auth0/lock/pull/1079) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fix custom theme for custom connections [\#1083](https://github.com/auth0/lock/pull/1083) ([luisrudge](https://github.com/luisrudge)) - Fix spacing using custom signup fields [\#1076](https://github.com/auth0/lock/pull/1076) ([luisrudge](https://github.com/luisrudge)) - Fixed Slovak translations [\#1069](https://github.com/auth0/lock/pull/1069) ([stajo1](https://github.com/stajo1)) - ## [v10.19.0](https://github.com/auth0/lock/tree/v10.19.0) (2017-07-18) -[Full Changelog](https://github.com/auth0/lock/compare/v10.18.0...v10.19.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.18.0...v10.19.0) **Added** + - Added `oidcConformant` entry to the readme [\#1054](https://github.com/auth0/lock/pull/1054) ([luisrudge](https://github.com/luisrudge)) - Added a custom connection resolver option [\#1052](https://github.com/auth0/lock/pull/1052) ([luisrudge](https://github.com/luisrudge)) - Added Korean translation [\#1051](https://github.com/auth0/lock/pull/1051) ([couldseeme](https://github.com/couldseeme)) **Fixed** -- Set the username to the previously used email when toggling hrd [\#1056](https://github.com/auth0/lock/pull/1056) ([luisrudge](https://github.com/luisrudge)) +- Set the username to the previously used email when toggling hrd [\#1056](https://github.com/auth0/lock/pull/1056) ([luisrudge](https://github.com/luisrudge)) ## [v10.18.0](https://github.com/auth0/lock/tree/v10.18.0) (2017-06-23) -[Full Changelog](https://github.com/auth0/lock/compare/v10.17.0...v10.18.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.17.0...v10.18.0) **Added** + - Add analytics events [\#1036](https://github.com/auth0/lock/pull/1036) ([francocorreasosa](https://github.com/francocorreasosa)) - Lang Afrikaans South Africa [\#1035](https://github.com/auth0/lock/pull/1035) ([jdunhin](https://github.com/jdunhin)) - Adding "show password" option [\#1029](https://github.com/auth0/lock/pull/1029) ([luisrudge](https://github.com/luisrudge)) **Changed** + - Upgrade React to fix IE11 issues [\#1039](https://github.com/auth0/lock/pull/1039) ([luisrudge](https://github.com/luisrudge)) **Removed** + - Removed node version restriction [\#1043](https://github.com/auth0/lock/pull/1043) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fixing empty popup on signup [\#1048](https://github.com/auth0/lock/pull/1048) ([luisrudge](https://github.com/luisrudge)) - Adding a flag for cross-auth [\#1044](https://github.com/auth0/lock/pull/1044) ([luisrudge](https://github.com/luisrudge)) - Fix custom connection scopes [\#1038](https://github.com/auth0/lock/pull/1038) ([luisrudge](https://github.com/luisrudge)) - ## [v10.17.0](https://github.com/auth0/lock/tree/v10.17.0) (2017-06-14) -[Full Changelog](https://github.com/auth0/lock/compare/v10.16.0...v10.17.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.16.0...v10.17.0) **Added** + - Added allowAutoComplete ui option [\#1022](https://github.com/auth0/lock/pull/1022) ([luisrudge](https://github.com/luisrudge)) - When in OIDC mode, enterprise connections always go to IdP page [\#1019](https://github.com/auth0/lock/pull/1019) ([luisrudge](https://github.com/luisrudge)) - Added Cross Origin Auth support in OIDC mode [\#1013](https://github.com/auth0/lock/pull/1013) ([luisrudge](https://github.com/luisrudge)) - Emit authorization_error when username/password fails (invalid_user_password) [\#999](https://github.com/auth0/lock/pull/999) ([luisrudge](https://github.com/luisrudge)) **Changed** + - Improved Danish translation [\#1033](https://github.com/auth0/lock/pull/1033) ([denkristoffer](https://github.com/denkristoffer)) - Scroll to the error message by default [\#1023](https://github.com/auth0/lock/pull/1023) ([m-idler](https://github.com/m-idler)) - Enabled HTML formatting for flashMessages [\#1017](https://github.com/auth0/lock/pull/1017) ([dariobanfi](https://github.com/dariobanfi)) - package.json: ~ range allowed for auth0-js dep [\#1015](https://github.com/auth0/lock/pull/1015) ([lexaurin](https://github.com/lexaurin)) **Fixed** + - Removed extra scroll on mobile view [\#1031](https://github.com/auth0/lock/pull/1031) ([beneliflo](https://github.com/beneliflo)) - Fixing tooltip error in the email pane [\#1030](https://github.com/auth0/lock/pull/1030) ([luisrudge](https://github.com/luisrudge)) - Fix react-addons-css-transition-group issue [\#1001](https://github.com/auth0/lock/pull/1001) ([eoinmurray](https://github.com/eoinmurray)) - Fixed overrides sent to auth0.js [\#997](https://github.com/auth0/lock/pull/997) ([sandrinodimattia](https://github.com/sandrinodimattia)) - ## [v10.16.0](https://github.com/auth0/lock/tree/v10.16.0) (2017-05-08) -[Full Changelog](https://github.com/auth0/lock/compare/v10.15.1...v10.16.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.15.1...v10.16.0) **Added** + - Add form method [\#993](https://github.com/auth0/lock/pull/993) ([luisrudge](https://github.com/luisrudge)) **Changed** + - Update badge location for better performance and bundle max-age changes [\#995](https://github.com/auth0/lock/pull/995) ([ramasilveyra](https://github.com/ramasilveyra)) **Fixed** + - Fix long header title and Error messages overflow [\#990](https://github.com/auth0/lock/pull/990) ([beneliflo](https://github.com/beneliflo)) - Fix grammar mistake RU [\#988](https://github.com/auth0/lock/pull/988) ([uladar](https://github.com/uladar)) - ## [v10.15.1](https://github.com/auth0/lock/tree/v10.15.1) (2017-04-25) -[Full Changelog](https://github.com/auth0/lock/compare/v10.15.0...v10.15.1) +[Full Changelog](https://github.com/auth0/lock/compare/v10.15.0...v10.15.1) **Fixed** -- Moving dependencies to devDependencies [\#984](https://github.com/auth0/lock/pull/984) ([luisrudge](https://github.com/luisrudge)) +- Moving dependencies to devDependencies [\#984](https://github.com/auth0/lock/pull/984) ([luisrudge](https://github.com/luisrudge)) ## [v10.15.0](https://github.com/auth0/lock/tree/v10.15.0) (2017-04-24) -[Full Changelog](https://github.com/auth0/lock/compare/v10.14.0...v10.15.0) +[Full Changelog](https://github.com/auth0/lock/compare/v10.14.0...v10.15.0) **Added** + - Add support for paypal-sandbox strategy [\#975](https://github.com/auth0/lock/pull/975) ([ziluvatar](https://github.com/ziluvatar)) **Changed** + - Upgrade auth0-js to v8.6.0 [\#980](https://github.com/auth0/lock/pull/980) ([luisrudge](https://github.com/luisrudge)) -- Adding prettier and a precommit script to format the code :tada: :lipstick: [\#977](https://github.com/auth0/lock/pull/977) ([luisrudge](https://github.com/luisrudge)) +- Adding prettier and a precommit script to format the code :tada: :lipstick: [\#977](https://github.com/auth0/lock/pull/977) ([luisrudge](https://github.com/luisrudge)) - Upgrading usage of prop-types to new package [\#971](https://github.com/auth0/lock/pull/971) ([luisrudge](https://github.com/luisrudge)) - Use replaceState for better browser history experience [\#967](https://github.com/auth0/lock/pull/967) ([selaux](https://github.com/selaux)) - Renaming internal `signOut` methods with `logout` to keep it consistent [\#966](https://github.com/auth0/lock/pull/966) ([luisrudge](https://github.com/luisrudge)) @@ -980,23 +1351,27 @@ In the meantime, react@16 works just fine with this codebase. You'll just have t - Adding `key` to the error "An error occurred when fetching data" [\#956](https://github.com/auth0/lock/pull/956) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fixed typo in cs.js [\#979](https://github.com/auth0/lock/pull/979) ([fersman](https://github.com/fersman)) - fixed propType misspell in header.jsx [\#973](https://github.com/auth0/lock/pull/973) ([nickpisacane](https://github.com/nickpisacane)) - Fixed scrolling on mobile in landscape mode [\#963](https://github.com/auth0/lock/pull/963) ([luisrudge](https://github.com/luisrudge)) - ## [v10.14.0](https://github.com/auth0/lock/tree/v10.14.0) (2017-03-27) + [Full Changelog](https://github.com/auth0/lock/compare/v10.13.0...v10.14.0) **Closed issues** + - prefill option is lost after reset password [\#933](https://github.com/auth0/lock/issues/933) **Added** + - Throw an error when audience is used without oidcConformant flag [\#947](https://github.com/auth0/lock/pull/947) ([luisrudge](https://github.com/luisrudge)) - Added Finnish translation [\#936](https://github.com/auth0/lock/pull/936) ([kettunen](https://github.com/kettunen)) - Added Ukrainian translation [\#931](https://github.com/auth0/lock/pull/931) ([grsmv](https://github.com/grsmv)) **Changed** + - Upgrade auth0js to v8.5.0 [\#952](https://github.com/auth0/lock/pull/952) ([luisrudge](https://github.com/luisrudge)) - Disable social buttons when terms were not accepted on sign up [\#949](https://github.com/auth0/lock/pull/949) ([luisrudge](https://github.com/luisrudge)) - Better explanation about the sso option [\#948](https://github.com/auth0/lock/pull/948) ([luisrudge](https://github.com/luisrudge)) @@ -1004,19 +1379,22 @@ In the meantime, react@16 works just fine with this codebase. You'll just have t - Add support for success and error messages to be in HTML [\#928](https://github.com/auth0/lock/pull/928) ([luisrudge](https://github.com/luisrudge)) **Fixed** + - Fixing Italian dictionary [\#950](https://github.com/auth0/lock/pull/950) ([ilmistra](https://github.com/ilmistra)) - Don't clear email field after reset password [\#945](https://github.com/auth0/lock/pull/945) ([luisrudge](https://github.com/luisrudge)) - Disable autoCorrect and spellCheck in the username input [\#927](https://github.com/auth0/lock/pull/927) ([luisrudge](https://github.com/luisrudge)) - ## [v10.13.0](https://github.com/auth0/lock/tree/v10.13.0) (2017-03-13) + [Full Changelog](https://github.com/auth0/lock/compare/v10.12.3...v10.13.0) **Closed issues** + - State with `=`, `&` characters is incorrectly parsed from url fragment [\#913](https://github.com/auth0/lock/issues/913) - Add support for Evernote strategy [\#895](https://github.com/auth0/lock/issues/895) **Fixed** + - Updated auth0 js version [\#924](https://github.com/auth0/lock/pull/924) ([hzalaz](https://github.com/hzalaz)) - Adds evernote social icon [\#923](https://github.com/auth0/lock/pull/923) ([vctrfrnndz](https://github.com/vctrfrnndz)) - Add japanese translation for "OR" [\#921](https://github.com/auth0/lock/pull/921) ([vctrfrnndz](https://github.com/vctrfrnndz)) @@ -1024,36 +1402,37 @@ In the meantime, react@16 works just fine with this codebase. You'll just have t - Replace querystring implementation with qs module [\#916](https://github.com/auth0/lock/pull/916) ([elger](https://github.com/elger)) - Use error.name to find the correct error message for invalid passwords [\#904](https://github.com/auth0/lock/pull/904) ([luisrudge](https://github.com/luisrudge)) - ## [v10.12.3](https://github.com/auth0/lock/tree/v10.12.3) (2017-03-07) -[Full Changelog](https://github.com/auth0/lock/compare/v10.12.2...v10.12.3) +[Full Changelog](https://github.com/auth0/lock/compare/v10.12.2...v10.12.3) **Fixed** + - Update node engine restriction [\#909](https://github.com/auth0/lock/pull/909) ([hzalaz](https://github.com/hzalaz)) - Fixed Czech translation [\#902](https://github.com/auth0/lock/pull/902) ([FilipPyrek](https://github.com/FilipPyrek)) - ## [v10.12.2](https://github.com/auth0/lock/tree/v10.12.2) (2017-03-03) -[Full Changelog](https://github.com/auth0/lock/compare/v10.12.1...v10.12.2) +[Full Changelog](https://github.com/auth0/lock/compare/v10.12.1...v10.12.2) **Fixed** -- Specify owp for non oidc web api in popup mode [\#897](https://github.com/auth0/lock/pull/897) ([hzalaz](https://github.com/hzalaz)) +- Specify owp for non oidc web api in popup mode [\#897](https://github.com/auth0/lock/pull/897) ([hzalaz](https://github.com/hzalaz)) ## [v10.12.1](https://github.com/auth0/lock/tree/v10.12.1) (2017-03-03) -[Full Changelog](https://github.com/auth0/lock/compare/v10.12.0...v10.12.1) +[Full Changelog](https://github.com/auth0/lock/compare/v10.12.0...v10.12.1) **Fixed** -- Fixed npm transpiled code [\#893](https://github.com/auth0/lock/pull/893) ([hzalaz](https://github.com/hzalaz)) +- Fixed npm transpiled code [\#893](https://github.com/auth0/lock/pull/893) ([hzalaz](https://github.com/hzalaz)) ## [v10.12.0](https://github.com/auth0/lock/tree/v10.12.0) (2017-03-02) + [Full Changelog](https://github.com/auth0/lock/compare/v10.11.0...v10.12.0) **Closed issues** + - Bug in email field validation [\#884](https://github.com/auth0/lock/issues/884) - Input field tab issue in IE [\#870](https://github.com/auth0/lock/issues/870) - Bring back the integratedWindowsLogin option [\#852](https://github.com/auth0/lock/issues/852) @@ -1061,10 +1440,12 @@ In the meantime, react@16 works just fine with this codebase. You'll just have t - Back button not displaying properly in IE 11 [\#767](https://github.com/auth0/lock/issues/767) **Added** + - Added checkbox CustomInput for additionalSignUpFields [\#860](https://github.com/auth0/lock/pull/860) ([dariobanfi](https://github.com/dariobanfi)) - Add slovak translation [\#846](https://github.com/auth0/lock/pull/846) ([Passto](https://github.com/Passto)) **Changed** + - Update password sheriff to reduce bundle size [\#879](https://github.com/auth0/lock/pull/879) ([hzalaz](https://github.com/hzalaz)) - Adding focusable=false to all svgs [\#873](https://github.com/auth0/lock/pull/873) ([luisrudge](https://github.com/luisrudge)) - Migrating to webpack2 [\#871](https://github.com/auth0/lock/pull/871) ([luisrudge](https://github.com/luisrudge)) @@ -1074,116 +1455,133 @@ In the meantime, react@16 works just fine with this codebase. You'll just have t - Kerberos network checking no longer depends on rememberLastLogin [\#805](https://github.com/auth0/lock/pull/805) ([patrickmcgraw](https://github.com/patrickmcgraw)) **Fixed** + - Updated auth0.js to v8.3.0 [\#889](https://github.com/auth0/lock/pull/889) ([hzalaz](https://github.com/hzalaz)) - Fix issue when submiting a form with no email [\#886](https://github.com/auth0/lock/pull/886) ([selaux](https://github.com/selaux)) - Fixing allowSignup and allowForgot options when loading tenant info [\#877](https://github.com/auth0/lock/pull/877) ([luisrudge](https://github.com/luisrudge)) -- Don't disable mfa-code input [\#872](https://github.com/auth0/lock/pull/872) ([nikolaseu](https://github.com/nikolaseu)) +- Don't disable mfa-code input [\#872](https://github.com/auth0/lock/pull/872) ([nikolaseu](https://github.com/nikolaseu)) - Fix a box-sizing issue that happened when bootstrap was being used with lock [\#868](https://github.com/auth0/lock/pull/868) ([luisrudge](https://github.com/luisrudge)) - Cleaning params sent to auth0js [\#863](https://github.com/auth0/lock/pull/863) ([luisrudge](https://github.com/luisrudge)) - Only set prefill values when application is initialized [\#855](https://github.com/auth0/lock/pull/855) ([luisrudge](https://github.com/luisrudge)) - ## [v10.11.0](https://github.com/auth0/lock/tree/v10.11.0) (2017-01-30) + [Full Changelog](https://github.com/auth0/lock/compare/v10.10.2...v10.11.0) **Closed issues** + - Input error state does not get reset when changing page [\#843](https://github.com/auth0/lock/issues/843) - Show error when the domain part of the email does not match any enterprise connection [\#661](https://github.com/auth0/lock/issues/661) **Added** + - inject cordova plugin and force popup/sso in cordova or electron [\#835](https://github.com/auth0/lock/pull/835) ([glena](https://github.com/glena)) - Japanese translation [\#834](https://github.com/auth0/lock/pull/834) ([stevensacks](https://github.com/stevensacks)) - disable submit button when the email does not match with any connection [\#757](https://github.com/auth0/lock/pull/757) ([glena](https://github.com/glena)) **Changed** + - Clear invalid fields on screen change [\#844](https://github.com/auth0/lock/pull/844) ([glena](https://github.com/glena)) - Bump the babel-preset-2015 version [\#838](https://github.com/auth0/lock/pull/838) ([iamkevingreen](https://github.com/iamkevingreen)) - ## [v10.10.2](https://github.com/auth0/lock/tree/v10.10.2) (2017-01-23) -[Full Changelog](https://github.com/auth0/lock/compare/v10.10.1...v10.10.2) +[Full Changelog](https://github.com/auth0/lock/compare/v10.10.1...v10.10.2) **Fixed** + - Fix casing of null in IE (bumping auth0.js version) [\#827](https://github.com/auth0/lock/pull/827) ([glena](https://github.com/glena)) - Fix ES translations [\#826](https://github.com/auth0/lock/pull/826) ([perpifran](https://github.com/perpifran)) - Translated term mfaLoginTitle into Dutch [\#820](https://github.com/auth0/lock/pull/820) ([dctoon](https://github.com/dctoon)) - For autologin, if login screen is not available, it should show the error in the signup one instead of breaking [\#817](https://github.com/auth0/lock/pull/817) ([glena](https://github.com/glena)) - ## [v10.10.1](https://github.com/auth0/lock/tree/v10.10.1) (2017-01-19) -[Full Changelog](https://github.com/auth0/lock/compare/v10.10.0...v10.10.1) +[Full Changelog](https://github.com/auth0/lock/compare/v10.10.0...v10.10.1) **Changed** -- Bump auth0.js to 8.1.2 [\#821](https://github.com/auth0/lock/pull/821) ([glena](https://github.com/glena)) +- Bump auth0.js to 8.1.2 [\#821](https://github.com/auth0/lock/pull/821) ([glena](https://github.com/glena)) ## [v10.10.0](https://github.com/auth0/lock/tree/v10.10.0) (2017-01-17) + [Full Changelog](https://github.com/auth0/lock/compare/v10.9.2...v10.10.0) **Closed issues** + - Lock v10.9.2 fails on IE 10 Windows 7 [\#801](https://github.com/auth0/lock/issues/801) **Added** + - Add resumeAuth method and autoParseHash flag [\#790](https://github.com/auth0/lock/pull/790) ([luisrudge](https://github.com/luisrudge)) - Hide first screen title option [\#745](https://github.com/auth0/lock/pull/745) ([glena](https://github.com/glena)) **Changed** + - Update zh.js [\#774](https://github.com/auth0/lock/pull/774) ([leplay](https://github.com/leplay)) **Fixed** + - Fix: popup does not close when signup fails [\#810](https://github.com/auth0/lock/pull/810) ([glena](https://github.com/glena)) - removes scope openid warning in OIDC conformant mode. fix #780 [\#803](https://github.com/auth0/lock/pull/803) ([luisrudge](https://github.com/luisrudge)) - Clearing fields when lock closes [\#802](https://github.com/auth0/lock/pull/802) ([luisrudge](https://github.com/luisrudge)) - Fix redirect/popup login when shown in the hosted login page [\#799](https://github.com/auth0/lock/pull/799) ([glena](https://github.com/glena)) **Breaking changes** + - Bump auth0.js version - Fix profile casing (it should not convert to cammelcase) [\#815](https://github.com/auth0/lock/pull/815) ([glena](https://github.com/glena)) In lock v10.9 we introduced an issue in auth0.js that changed the casing of the calls to retrieve the user profile (using `/userinfo` or `/tokeninfo`), everything was converted to camel case. We fixed that issue in this [auth0.js pull request](https://github.com/auth0/auth0.js/pull/307) and is part of this release of Lock. If you kept an v10.8 or older no changes are needed, for those who updated to v10.9 you need to revert the changes made to handle the case changes. ## [v10.9.2](https://github.com/auth0/lock/tree/v10.9.2) (2017-01-11) + [Full Changelog](https://github.com/auth0/lock/compare/v10.9.1...v10.9.2) **Fixed** + - Bring back support for get profile in default mode [\#794](https://github.com/auth0/lock/pull/794) ([glena](https://github.com/glena)) - Don't emit error when registering for event 'signin ready' [\#784](https://github.com/auth0/lock/pull/784) ([theopak](https://github.com/theopak)) - ## [v10.9.1](https://github.com/auth0/lock/tree/v10.9.1) (2017-01-10) + [Full Changelog](https://github.com/auth0/lock/compare/v10.9.0...v10.9.1) **Fixed** + - Fix to comply legacy behaviour [\#787](https://github.com/auth0/lock/pull/787) ([glena](https://github.com/glena)) - For legacy flow, the scope should default to openid [\#783](https://github.com/auth0/lock/pull/783) ([glena](https://github.com/glena)) - ## [v10.9.0](https://github.com/auth0/lock/tree/v10.9.0) (2017-01-09) + [Full Changelog](https://github.com/auth0/lock/compare/v10.8.0-beta.5...v10.9.0) **Added** + - Migrate to auth0.js v8 [\#744](https://github.com/auth0/lock/pull/744) ([glena](https://github.com/glena)) **Changed** + - Removed browserify as dependency and removed process usage [\#779](https://github.com/auth0/lock/pull/779) ([glena](https://github.com/glena)) - Auth0js v8 - configuration validation + default scope [\#775](https://github.com/auth0/lock/pull/775) ([glena](https://github.com/glena)) - ## [v10.8.1](https://github.com/auth0/lock/tree/v10.8.1) (2017-01-03) + [Full Changelog](https://github.com/auth0/lock/compare/v10.8.0...v10.8.1) **Closed issues** + - username/password login doesn't work with custom domains on the appliance [\#772](https://github.com/auth0/lock/issues/772) **Fixed** -- allow to override tenant + issuer and pass to auth0.js [\#773](https://github.com/auth0/lock/pull/773) ([glena](https://github.com/glena)) +- allow to override tenant + issuer and pass to auth0.js [\#773](https://github.com/auth0/lock/pull/773) ([glena](https://github.com/glena)) ## [v10.8.0](https://github.com/auth0/lock/tree/v10.8.0) (2017-01-02) + [Full Changelog](https://github.com/auth0/lock/compare/v10.7.3...v10.8.0) **Closed issues** + - Request to add user-facing error message. [\#751](https://github.com/auth0/lock/issues/751) - Please throw an error for invalid events [\#748](https://github.com/auth0/lock/issues/748) - Old errors shown when reopening Lock [\#739](https://github.com/auth0/lock/issues/739) @@ -1192,6 +1590,7 @@ In lock v10.9 we introduced an issue in auth0.js that changed the casing of the - [v10] Enterprise connections don't strip domain from email [\#543](https://github.com/auth0/lock/issues/543) **Added** + - Allow to override socialButtonStyle on show [\#766](https://github.com/auth0/lock/pull/766) ([glena](https://github.com/glena)) - Added new error code: session_missing [\#760](https://github.com/auth0/lock/pull/760) ([glena](https://github.com/glena)) - Add events validation and fail if it is not a valid one [\#756](https://github.com/auth0/lock/pull/756) ([glena](https://github.com/glena)) @@ -1200,95 +1599,118 @@ In lock v10.9 we introduced an issue in auth0.js that changed the casing of the - Create fa.js [\#752](https://github.com/auth0/lock/pull/752) ([doroudi](https://github.com/doroudi)) **Changed** + - Hide errors after close lock [\#761](https://github.com/auth0/lock/pull/761) ([glena](https://github.com/glena)) **Fixed** + - removed whitespace from input name [\#764](https://github.com/auth0/lock/pull/764) ([dangler](https://github.com/dangler)) - fixed typo [\#762](https://github.com/auth0/lock/pull/762) ([dev101](https://github.com/dev101)) - ## [v10.7.3](https://github.com/auth0/lock/tree/v10.7.3) (2016-12-19) + [Full Changelog](https://github.com/auth0/lock/compare/v10.7.2...v10.7.3) **Fixed** + - Shorten Russian signUpLabel to fit into the widget width [\#743](https://github.com/auth0/lock/pull/743) ([cyxou](https://github.com/cyxou)) ## [v10.7.2](https://github.com/auth0/lock/tree/v10.7.2) (2016-12-01) + [Full Changelog](https://github.com/auth0/lock/compare/v10.7.1...v10.7.2) **Fixed** + - Fix how the tenant and application info url is build to avoid format issues [\#740](https://github.com/auth0/lock/pull/740) ([glena](https://github.com/glena)) - Fix: Single saml connection with no domain shows undefined in button [\#738](https://github.com/auth0/lock/pull/738) ([glena](https://github.com/glena)) ## [v10.7.1](https://github.com/auth0/lock/tree/v10.7.1) (2016-11-25) + [Full Changelog](https://github.com/auth0/lock/compare/v10.7.0...v10.7.1) **Fixed** + - fix options override on show [\#732](https://github.com/auth0/lock/pull/732) ([glena](https://github.com/glena)) - One questionmark is enough [\#731](https://github.com/auth0/lock/pull/731) ([retorquere](https://github.com/retorquere)) ## [v10.7.0](https://github.com/auth0/lock/tree/v10.7.0) (2016-11-22) + [Full Changelog](https://github.com/auth0/lock/compare/v10.6.1...v10.7.0) **Added** + - Add missing Norwegian translations [\#721](https://github.com/auth0/lock/pull/721) ([francisrath](https://github.com/francisrath)) **Changed** + - Update auth0.js to v7.5.0 [\#730](https://github.com/auth0/lock/pull/730) ([hzalaz](https://github.com/hzalaz)) - "Email" type for email input [\#724](https://github.com/auth0/lock/pull/724) ([glena](https://github.com/glena)) - Enterprise: force username for AD connections [\#714](https://github.com/auth0/lock/pull/714) ([glena](https://github.com/glena)) **Deprecated** + - Deprecated getProfile and added getUserInfo instead [\#726](https://github.com/auth0/lock/pull/726) ([glena](https://github.com/glena)) ## [v10.6.1](https://github.com/auth0/lock/tree/v10.6.1) (2016-11-09) + [Full Changelog](https://github.com/auth0/lock/compare/v10.6.0...v10.6.1) **Fixed** + - Removed UMD bundling and using browser only [\#709](https://github.com/auth0/lock/pull/709) ([glena](https://github.com/glena)) ## [v10.6.0](https://github.com/auth0/lock/tree/v10.6.0) (2016-11-07) + [Full Changelog](https://github.com/auth0/lock/compare/v10.5.1...v10.6.0) **Changed** + - Update auth0.js to 7.4.0 [\#705](https://github.com/auth0/lock/pull/705) ([hzalaz](https://github.com/hzalaz)) - allow to override language, dict, logo and primary color on show method [\#680](https://github.com/auth0/lock/pull/680) ([glena](https://github.com/glena)) - Webpack for bundling [\#663](https://github.com/auth0/lock/pull/663) ([glena](https://github.com/glena)) **Fixed** + - Disable passwordless connections for SSO [\#691](https://github.com/auth0/lock/pull/691) ([glena](https://github.com/glena)) ## [v10.5.1](https://github.com/auth0/lock/tree/v10.5.1) (2016-10-28) + [Full Changelog](https://github.com/auth0/lock/compare/v10.5.0...v10.5.1) **Closed issues** + - [Lock 10.5.0] Prefill fails when using username [\#685](https://github.com/auth0/lock/issues/685) - [Lock 10.5.0] "TypeError: next is not a function" when closing social connection popup [\#682](https://github.com/auth0/lock/issues/682) **Fixed** + - Disabled username verification for prefill [\#686](https://github.com/auth0/lock/pull/686) ([glena](https://github.com/glena)) - 'TypeError: next is not a function' when closing social connection popup [\#684](https://github.com/auth0/lock/pull/684) ([glena](https://github.com/glena)) - Fix focus visual feedback in email and username inputs [\#681](https://github.com/auth0/lock/pull/681) ([gnandretta](https://github.com/gnandretta)) ## [v10.5.0](https://github.com/auth0/lock/tree/v10.5.0) (2016-10-24) + [Full Changelog](https://github.com/auth0/lock/compare/v10.4.1...v10.5.0) **Closed issues** -- [v10.4.0] Cannot read property 'get' of undefined. [\#658](https://github.com/auth0/lock/issues/658) + +- [v10.4.0] Cannot read property 'get' of undefined. [\#658](https://github.com/auth0/lock/issues/658) - Lock not showing rule errors in redirect mode [\#637](https://github.com/auth0/lock/issues/637) - Single AD connection without domain shows undefined in message [\#627](https://github.com/auth0/lock/issues/627) - Issues with Overlay mode + signUpLink setting on a SPA [\#619](https://github.com/auth0/lock/issues/619) - [UX] Password field shouldn't show error message immediately (on focus). [\#540](https://github.com/auth0/lock/issues/540) **Added** + - Create vi.js in /src/i18n [\#662](https://github.com/auth0/lock/pull/662) ([IoHL](https://github.com/IoHL)) - Added support for custom oauth2 connections [\#648](https://github.com/auth0/lock/pull/648) ([glena](https://github.com/glena)) - Create ca.js [\#645](https://github.com/auth0/lock/pull/645) ([alexandresaiz](https://github.com/alexandresaiz)) - Support connectionScopes for oauth2 connections [\#643](https://github.com/auth0/lock/pull/643) ([glena](https://github.com/glena)) - Allow to display a flash message on lock.show [\#639](https://github.com/auth0/lock/pull/639) ([glena](https://github.com/glena)) -- MFA when using oauth/ro endpoint [\#628](https://github.com/auth0/lock/pull/628) ([dafortune](https://github.com/dafortune)) +- MFA when using oauth/ro endpoint [\#628](https://github.com/auth0/lock/pull/628) ([dafortune](https://github.com/dafortune)) **Changed** + - Password field shouldn't show error message immediately (on focus) [\#668](https://github.com/auth0/lock/pull/668) ([glena](https://github.com/glena)) - Update auth0.js to latest [\#665](https://github.com/auth0/lock/pull/665) ([hzalaz](https://github.com/hzalaz)) - Added default values to the dictionary and warn about missing keys [\#651](https://github.com/auth0/lock/pull/651) ([glena](https://github.com/glena)) @@ -1297,6 +1719,7 @@ In lock v10.9 we introduced an issue in auth0.js that changed the casing of the - Update uglify task to generate sourcemaps [\#638](https://github.com/auth0/lock/pull/638) ([cristiandouce](https://github.com/cristiandouce)) **Fixed** + - Fix [v10.4.0] Cannot read property 'get' of undefined. #658 [\#660](https://github.com/auth0/lock/pull/660) ([glena](https://github.com/glena)) - Changed   to regular spaces. [\#653](https://github.com/auth0/lock/pull/653) ([nicosabena](https://github.com/nicosabena)) - Single AD connection without domain shows undefined in message [\#642](https://github.com/auth0/lock/pull/642) ([glena](https://github.com/glena)) @@ -1305,28 +1728,36 @@ In lock v10.9 we introduced an issue in auth0.js that changed the casing of the - Change the term email to e-mail and emailadres to e-mailadres [\#629](https://github.com/auth0/lock/pull/629) ([ToonDC](https://github.com/ToonDC)) ## [v10.4.1](https://github.com/auth0/lock/tree/v10.4.0) (2016-10-21) + [Full Changelog](https://github.com/auth0/lock/compare/v10.4.0...v10.4.1) **Changed** + - Update auth0.js to v7.3.0 ## [v10.4.0](https://github.com/auth0/lock/tree/v10.4.0) (2016-09-27) + [Full Changelog](https://github.com/auth0/lock/compare/v10.3.0...v10.4.0) **Closed issues** + - theme.logo regression in 10.3.0 [\#617](https://github.com/auth0/lock/issues/617) **Changed** + - Update auth0.js version to v7.2.1 [\#621](https://github.com/auth0/lock/pull/621) ([hzalaz](https://github.com/hzalaz)) **Fixed** + - Fix bad reference for unrecoverable_error event emitter [\#625](https://github.com/auth0/lock/pull/625) ([cristiandouce](https://github.com/cristiandouce)) - Fixes for 10.3.0 regression [\#618](https://github.com/auth0/lock/pull/618) ([doapp-ryanp](https://github.com/doapp-ryanp)) ## [v10.3.0](https://github.com/auth0/lock/tree/v10.3.0) (2016-09-19) + [Full Changelog](https://github.com/auth0/lock/compare/v10.2.2...v10.3.0) **Closed issues:** + - v10: KerberosScreen failing on internal Network [\#590](https://github.com/auth0/lock/issues/590) - Languages not available on cdn.eu.auth0.com [\#576](https://github.com/auth0/lock/issues/576) - The lock v10 with ionic2 page can not scroll. [\#532](https://github.com/auth0/lock/issues/532) @@ -1335,6 +1766,7 @@ In lock v10.9 we introduced an issue in auth0.js that changed the casing of the - White space on bottom when running/simulating on mobile device [\#376](https://github.com/auth0/lock/issues/376) **Fixed:** + - Bump blueimp-md5@2.3.1 [\#613](https://github.com/auth0/lock/pull/613) ([cristiandouce](https://github.com/cristiandouce)) - Handle uncaught unrecoverable_error [\#609](https://github.com/auth0/lock/pull/609) ([eddiezane](https://github.com/eddiezane)) - fixed loading unaligned with label submit [\#606](https://github.com/auth0/lock/pull/606) ([beneliflo](https://github.com/beneliflo)) @@ -1344,6 +1776,7 @@ In lock v10.9 we introduced an issue in auth0.js that changed the casing of the - fixed ionic page scroll [\#591](https://github.com/auth0/lock/pull/591) ([beneliflo](https://github.com/beneliflo)) **Added:** + - Add min/max username validation from application info settings [\#611](https://github.com/auth0/lock/pull/611) ([cristiandouce](https://github.com/cristiandouce)) - Introduce clientBaseUrl and languageBaseUrl options to deprecate assetsUrl [\#601](https://github.com/auth0/lock/pull/601) ([cristiandouce](https://github.com/cristiandouce)) - Added Hungarian translations [\#599](https://github.com/auth0/lock/pull/599) ([nagyv](https://github.com/nagyv)) @@ -1351,6 +1784,7 @@ In lock v10.9 we introduced an issue in auth0.js that changed the casing of the - Added Swedish (sv) translation. [\#593](https://github.com/auth0/lock/pull/593) ([kuljaninemir](https://github.com/kuljaninemir)) **Changed:** + - use ReactCSSTransitionGroup for global messages [\#595](https://github.com/auth0/lock/pull/595) ([robbiewxyz](https://github.com/robbiewxyz)) **Deprecation notice:** @@ -1363,6 +1797,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - If `assetsUrl` is provided, keep the current behavior: fetch application from `${assetsUrl}/client/${clientID}.js` and languages from `{assetsUrl}/js/lock/${lockVersion}/${language}.js`. ## [v10.2.3](https://github.com/auth0/lock/tree/v10.2.3) (2016-10-21) + [Full Changelog](https://github.com/auth0/lock/compare/v10.2.2...v10.2.3) ### Changed @@ -1370,6 +1805,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Use auth0.js version 7.3.0 ## [v10.2.2](https://github.com/auth0/lock/tree/v10.2.2) (2016-08-31) + [Full Changelog](https://github.com/auth0/lock/compare/v10.2.1...v10.2.2) ### Fixed @@ -1381,6 +1817,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Change the default value for hash in WebApi.parseHash() internal method (#587) ## [v10.2.1](https://github.com/auth0/lock/tree/v10.2.1) (2016-08-18) + [Full Changelog](https://github.com/auth0/lock/compare/v10.2.0...v10.2.1) ### Fixed @@ -1388,6 +1825,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Allow dots in HRD username and clear errors before leaving the HRD screen (#574) ## [v10.2.0](https://github.com/auth0/lock/tree/v10.2.0) (2016-08-18) + [Full Changelog](https://github.com/auth0/lock/compare/v10.1.0...v10.2.0) ### Changed @@ -1409,6 +1847,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Add `nb` translation (#560) ## [v10.1.0](https://github.com/auth0/lock/tree/v10.1.0) (2016-08-09) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.2...v10.1.0) ### Added @@ -1416,6 +1855,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Add `de` translation (#546) ## [v10.0.2](https://github.com/auth0/lock/tree/v10.0.2) (2016-08-05) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.1...v10.0.2) ### Fixed @@ -1426,6 +1866,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Fix email input in IE 10 (#537) ## [v10.0.1](https://github.com/auth0/lock/tree/v10.0.1) (2016-07-27) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.0...v10.0.1) ### Fixed @@ -1435,6 +1876,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Ensure header styling looks fine in IE (#507) ## [v10.0.0](https://github.com/auth0/lock/tree/v10.0.0) (2016-07-20) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.0-rc.2...v10.0.0) ### Changed @@ -1451,6 +1893,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Handle the new variants of password policy errors during sign up. ## [v10.0.0-rc.2](https://github.com/auth0/lock/tree/v10.0.0-rc.2) (2016-07-05) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.0-rc.1...v10.0.0-rc.2) ### Fixed @@ -1466,6 +1909,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of specify a hint that will be displayed when the field is invalid. ## [v10.0.0-rc.1](https://github.com/auth0/lock/tree/v10.0.0-rc.1) (2016-06-22) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.0-beta.5...v10.0.0-rc.1)d ### Change @@ -1473,6 +1917,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of - Show Auth0 badge in the bottom only for free plans. ## [v10.0.0-beta.5](https://github.com/auth0/lock/tree/v10.0.0-beta.5) (2016-06-21) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.0-beta.4...v10.0.0-beta.5) ### Fixed @@ -1500,12 +1945,13 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of the authentication result as the only argument. - `authorization_error`: emitted when authorization fails. Has the error as the only argument. - Note the `authenticated` and `authorization_error` events replace - the callback in the constructor. + Note the `authenticated` and `authorization_error` events replace + the callback in the constructor. - Display a tooltip on invalid inputs with a hint on how to fix the error. ## [v10.0.0-beta.4](https://github.com/auth0/lock/tree/v10.0.0-beta.4) (2016-05-17) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.0-beta.3...v10.0.0-beta.4) ### Fixed @@ -1524,6 +1970,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of list of options. ## [v10.0.0-beta.3](https://github.com/auth0/lock/tree/v10.0.0-beta.3) (2016-05-10) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.0-beta.2...v10.0.0-beta.3) ### Fixed @@ -1538,6 +1985,7 @@ This version introduces `languageBaseUrl` and `clientBaseUrl` in replacement of username. ## [v10.0.0-beta.2](https://github.com/auth0/lock/tree/v10.0.0-beta.2) (2016-04-25) + [Full Changelog](https://github.com/auth0/lock/compare/v10.0.0-beta.1...v10.0.0-beta.2) ### Fixed diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 0a61ab5f0..8873bfa41 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -3,7 +3,7 @@ Requires: - [Yarn](https://yarnpkg.com/) -- Node 10.x +- [Node LTS](https://nodejs.org) ## Building @@ -20,13 +20,23 @@ yarn build Unit tests can be executed using [Jest](https://jestjs.io/) by issuing the following command: ``` -yarn test:jest +yarn test ``` To interactively perform tests using Jest's `watch` mode, use: ``` -yarn test:jest:watch +yarn test:watch +``` + +End-to-end tests can be executed locally using [Karma](https://karma-runner.github.io/), in both watch and CLI mode: + +``` +# CLI mode using Chrome Headless browser: +yarn test:e2e + +# Watch mode using Chrome desktop browser, in watch mode: +yarn test:e2e:watch ``` ## The SDK Playground diff --git a/EXAMPLES.md b/EXAMPLES.md new file mode 100644 index 000000000..c3409fddd --- /dev/null +++ b/EXAMPLES.md @@ -0,0 +1,651 @@ +# API Examples + +- [Constructors and Common Methods](#constructors-and-common-methods) +- [Customization](#customization) +- [Popup Mode](#popup-mode) + +## Constructors and Common Methods + +### new Auth0Lock(clientID, domain, options) + +Initializes a new instance of `Auth0Lock` configured with your application `clientID` and your account's `domain` at [Auth0](https://manage.auth0.com/). You can find this information in your [application settings](https://manage.auth0.com/#/applications). + +- **clientId {String}**: Your application _clientId_ in Auth0. +- **domain {String}**: Your Auth0 _domain_. Usually _your-account.auth0.com_. +- **options {Object}**: Allows you to customize the dialog's appearance and behavior. See [below](#customization) for the details. + +#### Example + +```js +var clientId = 'YOUR_AUTH0_APP_CLIENTID'; +var domain = 'YOUR_DOMAIN_AT.auth0.com'; +var lock = new Auth0Lock(clientId, domain); +var accessToken = null; +var profile = null; + +lock.on('authenticated', function (authResult) { + lock.getUserInfo(authResult.accessToken, function (error, profileResult) { + if (error) { + // Handle error + return; + } + + accessToken = authResult.accessToken; + profile = profileResult; + + // Update DOM + }); +}); +``` + +### new Auth0LockPasswordless(clientID, domain, options) + +Initializes a new instance of `Auth0LockPasswordless` configured with your application `clientID` and your account's `domain` at [Auth0](https://manage.auth0.com/). You can find this information in your [application settings](https://manage.auth0.com/#/applications). + +- **clientId {String}**: Your application _clientId_ in Auth0. +- **domain {String}**: Your Auth0 _domain_. Usually _your-account.auth0.com_. +- **options {Object}**: Allows you to customize the dialog's appearance and behavior. See [below](#customization) for the details. + +If both SMS and email passwordless connections are enabled [in the dashboard](https://manage.auth0.com/#/connections/passwordless), Lock will pick email by default. If you want to conditionally pick email or SMS, use the [`allowedConnections`](#ui-options) option, for example: `allowedConnections: ['sms']`. + +If using an [additional passwordless connection](#additional-passwordless-connections) that has been created through the Management API, you must specify the connection in `allowedConnections` and also enable the `useCustomPasswordlessConnection` flag in the options. + +For more information, read our [passwordless docs](https://auth0.com/docs/connections/passwordless). + +#### Example + +```js +var clientId = 'YOUR_AUTH0_APP_CLIENTID'; +var domain = 'YOUR_DOMAIN_AT.auth0.com'; +var lock = new Auth0LockPasswordless(clientId, domain); +var accessToken = null; +var profile = null; + +lock.on('authenticated', function (authResult) { + lock.getUserInfo(authResult.accessToken, function (error, profileResult) { + if (error) { + // Handle error + return; + } + + accessToken = authResult.accessToken; + profile = profileResult; + + // Update DOM + }); +}); +``` + +### getUserInfo(accessToken, callback) + +Once the user has logged in and you are in possession of an access token, you can obtain the profile with `getUserInfo`. + +- **accessToken {String}**: User access token. +- **callback {Function}**: Will be invoked after the user profile has been retrieved. + +#### Example + +```js +lock.getUserInfo(accessToken, function (error, profile) { + if (!error) { + alert('hello ' + profile.name); + } +}); +``` + +### on(event, callback) + +Lock will emit events during its lifecycle. + +- `show`: emitted when Lock is shown. Has no arguments. +- `hide`: emitted when Lock is hidden. Has no arguments. +- `unrecoverable_error`: emitted when there is an unrecoverable error, for instance when no connection is available. Has the error as the only argument. +- `authenticated`: emitted after a successful authentication. Has the authentication result as the only argument. +- `authorization_error`: emitted when authorization fails. Has the error as the only argument. +- `hash_parsed`: every time a new Auth0Lock object is initialized in redirect mode (the default), it will attempt to parse the hash part of the URL looking for the result of a login attempt. This is a _low-level_ event for advanced use cases and _authenticated_ and _authorization_error_ should be preferred when possible. After that, this event will be emitted with `null` if it couldn't find anything in the hash. It will be emitted with the same argument as the `authenticated` event after a successful login or with the same argument as `authorization_error` if something went wrong. This event won't be emitted in popup mode because there is no need to parse the URL's hash part. +- `forgot_password ready`: emitted when the "Forgot password" screen is shown. +- `forgot_password submit`: emitted when the user clicks on the submit button of the "Forgot password" screen. +- `signin submit`: emitted when the user clicks on the submit button of the "Login" screen. +- `signup submit`: emitted when the user clicks on the submit button of the "Sign up" screen. +- `signup success`: emitted when the user successfully signs up. +- `signup error`: emitted when signup fails. Has the error as an argument. +- `federated login`: emitted when the user clicks on a social connection button. Has the connection name and the strategy as arguments. +- `sso login`: emitted when the user clicks on an enterprise SSO connection button. Has the lock ID, connection object, and field name as arguments. +- `ssodata fetched`: emitted when the SSOData endpoint was called, usually as a result of an internal `checkSession` call. Has the error and the SSOData object as arguments. + +### show(options) + +Displays the widget, allowing you to override some options. + +- **options {Object}**: Allows you to customize some aspect of the dialog's appearance and behavior. The options allowed in here are a subset of the options allowed in the constructor and will override them: `allowedConnections`, `auth.params`, `allowLogin`, `allowSignUp`, `allowForgotPassword`, `initialScreen`, `rememberLastLogin`, `flashMessage` and `languageDictionary`. See [below](#customization) for the details. Keep in mind that `auth.params` will be fully replaced and not merged. + +#### Example + +```js +// without options +lock.show(); + +// will override the allowedConnections option passed to the constructor, if any +lock.show({ allowedConnections: ['twitter', 'facebook'] }); + +// will override the entire auth.params object passed to the constructor, if any +lock.show({ auth: { params: { state: 'auth_state' } } }); +``` + +### resumeAuth(hash, callback) + +If you set the [auth.autoParseHash](#authentication-options) option to `false`, you'll need to call this method to complete the authentication flow. This method is useful when you're using a client-side router that uses a `#` to handle URLs (angular2 with `useHash` or react-router with `hashHistory`). + +- **hash {String}**: The hash fragment received from the redirect. +- **callback {Function}**: Will be invoked after the parse is done. Has an error (if any) as the first argument and the authentication result as the second one. If there is no hash available, both arguments will be `null`. + +#### Example + +```js +lock.resumeAuth(hash, function (error, authResult) { + if (error) { + alert('Could not parse hash'); + } + console.log(authResult.accessToken); +}); +``` + +### logout(options) + +Logs out the user. + +- **options {Object}**: This is optional and follows the same rules as [this](https://auth0.com/docs/libraries/auth0js#logout). + +#### Example + +```js +lock.logout({ returnTo: 'https://myapp.com/bye-bye' }); +``` + +### checkSession(params, callback) + +The checkSession method allows you to acquire a new token from Auth0 for a user who is already authenticated against the universal login page for your domain. The method accepts any valid OAuth2 parameters that would normally be sent to authorize. In order to use this method, you have to enable Web Origins for your application. For more information, see [Using checkSession to acquire new tokens](https://auth0.com/docs/libraries/auth0js#using-checksession-to-acquire-new-tokens). + +- **params {Object}**: OAuth2 params object to send to Auth0's servers. +- **callback {Function}**: Will be invoked after the response from the server is returned. Has an error (if any) as the first argument and the authentication result as the second one. + +#### Example + +```js +lock.checkSession({}, function (error, authResult) { + if (error || !authResult) { + lock.show(); + } else { + // user has an active session, so we can use the accessToken directly. + lock.getUserInfo(authResult.accessToken, function (error, profile) { + console.log(error, profile); + }); + } +}); +``` + +## Customization + +The appearance of the widget and the mechanics of authentication can be customized with an `options` object which has one or more of the following properties. Each method that opens the dialog can take an `options` object as its first argument. + +### UI options + +- **allowedConnections {Array}**: List of connection that will be available to perform the authentication. It defaults to all enabled connections. +- **autoclose {Boolean}**: Determines whether or not the Lock will be closed automatically after a successful sign in. If the Lock is not `closable` it won't be closed even if this option is set to `true`. Defaults to `false`. +- **autofocus {Boolean}**: Determines whether or not the first input on the screen, that is the email or phone number input, should have focus when the Lock is displayed. Defaults to `false` when a `container` option is provided or the Lock is being rendered on a mobile device. Otherwise, it defaults to `true`. +- **avatar {Object}**: Determines whether or not an avatar and a username should be displayed on the Lock's header once an email or username has been entered and how to obtain it. By default avatars are fetched from [Gravatar](https://gravatar.com/). Supplying `null` will disable the functionality. To fetch avatar from other provider see [below](#avatar-provider). +- **container {String}**: The `id` of the HTML element where the Lock will be rendered. This makes the Lock appear inline instead of in a modal window. +- **language {String}**: Specifies the language of the widget. Defaults to `"en"`. Supported languages are: + - `de`: German + - `en`: English + - `es`: Spanish + - `it`: Italian + - `nb`: Norwegian bokmål + - `pt-BR`: Brazilian Portuguese + - `ru`: Russian + - `zh`: Chinese + - `ja`: Japanese + - [Check all the available languages](https://github.com/auth0/lock/tree/master/src/i18n) +- **languageDictionary {Object}**: Allows you to customize every piece of text displayed in the Lock. Defaults to `{}`. See below [Language Dictionary Specification](#language-dictionary-specification) for the details. +- **closable {Boolean}**: Determines whether or not the Lock can be closed. When a `container` option is provided its value is always `false`, otherwise it defaults to `true`. +- **popupOptions {Object}**: Allows you to customize the location of the popup in the screen. Any [position and size feature](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Position_and_size_features) allowed by `window.open` is accepted. Defaults to `{}`. +- **rememberLastLogin {Boolean}**: Determines whether or not to show a screen that allows you to quickly log in with the account you used the last time when the `initialScreen` option is set to `"login"` (the default). Defaults to `true`. +- **flashMessage {Object}**: Shows an `error` or `success` flash message when Lock is shown. + - **type {String}**: The message type, it should be `error` or `success`. + - **text {String}**: The text to show. +- **allowAutocomplete {Boolean}**: Determines whether or not the email or username inputs will allow autocomplete (``). Defaults to `false`. +- **scrollGlobalMessagesIntoView {Boolean}**: Determines whether or not a globalMessage should be scrolled into the user's viewport. Defaults to `true`. +- **allowShowPassword {Boolean}**: Determines whether or not add a checkbox to show the password when typing it. Defaults to `false`. +- **allowPasswordAutocomplete {Boolean}**: Determines whether the password field will allow autocomplete; setting this to `true` is required for password manager support and to avoid many cases of adverse behavior. Defaults to `false`. +- **preferConnectionDisplayName {Boolean}**: If true, Lock will try to use the connection display name as configured in the manage dashboard, if available. +- **forceAutoHeight {Boolean}**: If true, Lock will use the `height: auto!important` style on the wrapping div, which may be useful in some circumstances where `height: 100vh` is undesirable (see [\#1963](https://github.com/auth0/lock/issues/1963)). Defaults to `false`. + +### Theming options + +Theme options are grouped in the `theme` property of the `options` object. + +```js +var options = { + theme: { + labeledSubmitButton: false, + logo: 'https://example.com/assets/logo.png', + primaryColor: 'green', + authButtons: { + connectionName: { + displayName: '...', + primaryColor: '...', + foregroundColor: '...', + icon: 'https://.../logo.png' + } + } + } +}; +``` + +- **labeledSubmitButton {Boolean}**: Indicates whether or not the submit button should have a label. Defaults to `true`. When set to `false` an icon will be shown. The labels can be customized through the `languageDictionary`. +- **logo {String}**: Url for an image that will be placed in the Lock's header. Defaults to Auth0's logo. +- **primaryColor {String}**: Defines the primary color of the Lock, all colors used in the widget will be calculated from it. This option is useful when providing a custom `logo` to ensure all colors go well together with the logo's color palette. Defaults to `"#ea5323"`. +- **authButtons {Object}**: Allows the customization of the custom oauth2 login buttons. + - **displayName {String}**: The name to show instead of the connection name. + - **primaryColor {String}**: The button's background color. Defaults to `"#eb5424"`. + - **foregroundColor {String}**: The button's text color. Defaults to `"#FFFFFF"`. + - **icon {String}**: The icon's url for the connection. For example:`"https://site.com/logo.png"`. + +### Authentication options + +Authentication options are grouped in the `auth` property of the `options` object. The default scope used by Lock is `openid profile email`. + +```js +var options = { + auth: { + params: { + param1: 'value1', + scope: 'openid profile email' + }, + autoParseHash: true, + redirect: true, + redirectUrl: 'some url', + responseMode: 'form_post', + responseType: 'token', + sso: true, + connectionScopes: { + connectionName: ['scope1', 'scope2'] + } + } +}; +``` + +- **params {Object}**: Specifies extra parameters that will be sent when starting a login. Defaults to `{}`. +- **autoParseHash {Boolean}**: When set to `true`, Lock will parse the `window.location.hash` string when instantiated. If set to `false`, you'll have to manually resume authentication using the [resumeAuth](#resumeauthhash-callback) method. +- **redirect {Boolean}**: When set to `true`, the default, _redirect mode_ will be used. Otherwise, _popup mode_ is chosen. See [below](#popup-mode) for more details. +- **redirectUrl {String}**: The URL Auth0 will redirect back to after authentication. Defaults to the empty string `""` (no redirect URL). +- **responseMode {String}**: Should be set to `"form_post"` if you want the code or the token to be transmitted via an HTTP POST request to the `redirectUrl` instead of being included in its query or fragment parts. Otherwise, it should be omitted. +- **responseType {String}**: Should be set to `"token"` for Single Page Applications, and `"code"` otherwise. Also, `"id_token"` is supported for the first case. Defaults to `"code"` when `redirectUrl` is provided, and to `"token"` otherwise. +- **sso {Boolean}**: Determines whether Single Sign-On is enabled or not in **Lock**. The Auth0 SSO session will be created regardless of this option if SSO is enabled for your application or tenant. +- **connectionScopes {Object}**: Allows you to set scopes to be sent to the oauth2/social/enterprise connection for authentication. + +### Database options + +- **additionalSignUpFields {Array}**: Allows you to provide extra input fields during sign up. See [below](#additional-sign-up-fields) more for details. Defaults to `[]`. +- **allowLogin {Boolean}**: When set to `false` the widget won't display the _login screen_. This is useful if you want to use the widget just for signups (the _login and sign up tabs_ in the _sign up screen_ will be hidden) or to reset passwords (the _back button_ in the _forgot password screen_ will be hidden). In such cases you may also need to specify the `initialScreen`, `allowForgotPassword` and `allowSignUp` options. It defaults to `true`. +- **allowForgotPassword {Boolean}**: When set to `false` hides the _"Don't remember your password?"_ link in the _login screen_, making the _forgot password screen_ unreachable. Defaults to `true`. Keep in mind that if you are using a database connection with a _custom database_ which doesn't have a _change password script_ the forgot password screen won't be available. +- **allowSignUp {Boolean}**: When set to `false` hides the _login and sign up tabs_ in the _login screen_, making the _sign up screen_ unreachable. Defaults to `true`. Keep in mind that if the database connection has sign ups _disabled_ or you are using a _custom database_ which doesn't have a _create script_, then the sign up screen won't be available. +- **defaultDatabaseConnection {String}**: Specifies the database connection that will be used when there is more than one available. +- **initialScreen {String}**: Name of the screen that will be shown when the widget is opened. Valid values are `"login"`, `"signUp"`, and `"forgotPassword"`. If this option is left unspecified, the widget will pick the first screen that is available from the previous list. If you set `initialScreen` to `"forgotPassword"` we recommend that you set `allowLogin` to `"false"`, otherwise a back button will be shown in the forgot password screen and it might not be clear to the user where that back button will take them. +- **loginAfterSignUp {Boolean}**: Determines whether or not the user will be automatically signed in after a successful sign up. Defaults to `true`. +- **forgotPasswordLink {String}**: URL for a page that allows the user to reset her password. When set to a non-empty string, the user will be linked to the provided URL when clicking the _"Don't remember your password?"_ link in the _login screen_. +- **showTerms {Boolean}**: When set to `true` displays the `languageDictionary.signUpTerms` string. Defaults to `true`. +- **mustAcceptTerms {Boolean}**: When set to `true` displays a checkbox input along with the terms and conditions that must be checked before signing up. The terms and conditions can be specified via the `languageDictionary` option, see the example below. Defaults to `false`. +- **prefill {Object}**: Allows you to set the initial value for the _email_ and/or _username_ inputs, e.g. `{prefill: {email: "someone@auth0.com", username: "someone"}}`. When omitted no initial value will be provided. +- **signUpLink {String}**: URL for a page that allows the user to sign up. When set to a non-empty string, the user will be linked to the provided URL when clicking the _sign up_ tab in the _login screen_. +- **usernameStyle {String}**: Determines what will be used to identify the user for a Database connection that has the `requires_username` flag set, otherwise it will be ignored. Possible values are `"username"` and `"email"` and by default both `username` and `email` are allowed. +- **signUpHideUsernameField {Boolean}**: When set to `true` hides the _username_ input during sign up for a Database connection that has the `requires_username` flag set. Defaults to `false`. +- **signUpFieldsStrictValidation {Boolean}**: When set to `true`, the _email_ input on the sign-up page is validated using [`validator`](https://www.npmjs.com/package/validator). Otherwise, a very loose check is made on the format before being fully validate on the server. Defaults to `false`. + +### Enterprise options + +- **defaultEnterpriseConnection {String}**: Specifies the enterprise connection which allows you to log in using a username and a password that will be used when there is more than one available or there is a database connection. If a `defaultDatabaseConnection` is provided the database connection will be used and this option will be ignored. + +### Example + +```js +var options = { + container: 'myContainer', + closable: false, + languageDictionary: { + signUpTerms: + "I agree to the terms of service and privacy policy.", + title: 'My Company' + }, + autofocus: false +}; +``` + +### Passwordless options + +- **passwordlessMethod {String}**: When using `Auth0LockPasswordless` with an email connection, you can use this option to pick between sending a [code](https://auth0.com/docs/connections/passwordless/spa-email-code) or a [magic link](https://auth0.com/docs/connections/passwordless/spa-email-link) to authenticate the user. Available values for email connections are `code` and `link`. Defaults to `code`. SMS passwordless connections will always use `code`. +- **useCustomPasswordlessConnection {Boolean}**: Enables the use of a custom passwordless connection (see below). + +### Additional passwordless connections + +By default, only two passwordless connections are available: `email` and `sms`. However, it is possible to create additional passwordless connections that employ the `email` or `sms` strategy through the Management API. To use these connections in Lock, you must: + +1. Specify the custom connection in the `allowedConnections` option, and +2. Enable the `useCustomPasswordlessConnection` flag in the options + +Users logging in using this connection should then be associated with the correct passwordless connection and this can be verified in [the logs](https://manage.auth0.com/#/logs). + +**Note:** If you specify more than one connection in `allowedConnections`, the first one will always be used. + +### Hooks + +Lock supports hooks that can be used to integrate into various procedures within Lock. + +| Name | Description | +| ----------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `loggingIn` | Called when the user presses the login button; after validating the login form, but before calling the login endpoint | +| `signingUp` | Called when the user presses the button on the sign-up page; after validating the signup form, but before calling the sign up endpoint | + +**API** +Both hooks accept two arguments: + +| Name | Description | +| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `context` | this argument is currently always `null` but serves as a future-proofing mechanism to support providing additional data without us requiring breaking changes to the library | +| `cb` | a callback function to call when the hook is finished. Execution of the user journey is blocked until this function is called by the hook | + +**API** + +Specify your hooks using a new `hooks` configuration item when setting up the library: + +```js +new Auth0Lock('client ID', 'domain', { + hooks: { + loggingIn: function (context, cb) { + console.log('Hello from the login hook!'); + cb(); + }, + signingUp: function (context, cb) { + console.log('Hello from the sign-up hook!'); + cb(); + } + } +}); +``` + +**Error handling** + +The developer can throw an error to block the login or sign-up process. The developer can either specify a specific object and show the error on the page, or throw a generic error which causes Lock to show a fallback error: + +```js +new Auth0Lock('client ID', 'domain', { + hooks: { + loggingIn: function (context, cb) { + // Throw an object with code: `hook_error` to display this on the Login screen + throw { code: 'hook_error', description: 'There was an error in the login hook!' }; + + // Throw something generic to show a fallback error message + throw 'Some error happened'; + } + } +}); +``` + +**Note:** The error's `description` field is not sanitized by the SDK and so any content that reflects user input or could otherwise display dangerous HTML should be sanitized by your hook. + +### Other options + +- **configurationBaseUrl {String}**: Overrides application settings base URL. By default it uses Auth0's CDN URL when the `domain` has the format `*.auth0.com`. Otherwise, it uses the provided `domain`. +- **languageBaseUrl {String}**: Overrides the language source URL for Auth0's provided translations. By default it uses to Auth0's CDN URL `https://cdn.auth0.com` ([see below for details](#using-languagebaseurl-and-custom-language-files)) +- **hashCleanup {Boolean}**: When enabled, it will remove the hash part of the callback URL after the user authentication. Defaults to `true`. +- **connectionResolver {Function}**: When in use, provides an extensibility point to make it possible to choose which connection to use based on the username information. Has `username`, `context`, and `callback` as parameters. The callback expects an object like: `{type: 'database', name: 'connection name'}`. **This only works for database connections.** Keep in mind that this resolver will run in the form's `onSubmit` event, so keep it simple and fast. **This is a beta feature. If you find a bug, please open a GitHub [issue](https://github.com/auth0/lock/issues/new).** +- **legacySameSiteCookie**: If `false`, no compatibility cookies will be created for those browsers that do not understand the `SameSite` attribute. Defaults to `true`. **Note**: this setting only has an effect when running on an HTTPS domain; if HTTP is used, no legacy cookies are created regardless of this setting. + +```js +var options = { + connectionResolver: function (username, context, cb) { + var domain = username.includes('@') && username.split('@')[1]; + if (domain) { + // If the username is test@auth0.com, the connection used will be the `auth0.com` connection. + // Make sure you have a database connection with the name `auth0.com`. + cb({ type: 'database', name: domain }); + } else { + // Use the default approach to figure it out the connection + cb(null); + } + } +}; +``` + +### Language Dictionary Specification + +A language dictionary is an object that allows you to customize every piece of text the Lock needs to display. For instance, the following code will change the title displayed in the header and the placeholder for the email field. + +```js +var options = { + languageDictionary: { + emailInputPlaceholder: 'Please enter your email', + title: 'My Company' + } +}; +``` + +#### Using `languageBaseUrl` and custom language files + +By default, language files are loaded from Auth0's CDN. `languageBaseUrl` can be used to specify a different location where language files are hosted, including any new language files you author for your application. Here's an example of a custom language file. Note the call to `Auth0.registerLanguageDictionary` that wraps the language content: + +```js +Auth0.registerLanguageDictionary('en', { + error: { + forgotPassword: { + too_many_requests: + 'You have reached the limit on password change attempts. Please wait before trying again.', + 'lock.fallback': "We're sorry, something went wrong when requesting the password change.", + enterprise_email: + "Your email's domain is part of an Enterprise identity provider. To reset your password, please see your security administrator." + } + }, + { + // .. + } +}); +``` + +> **Note** +> Not all the language keys are provided here for this example. Typically all the keys must be specified ([see an example language file](https://github.com/auth0/lock/blob/master/src/i18n/en.js)). For keys that are not specified, Lock will fall back to the default English language file. + +### Additional sign up fields + +Extra input fields can be added to the sign up screen with the `additionalSignUpFields` option. Every input must have a `name` and a `placeholder`, and an `icon` URL can also be provided. Also, the initial value can be provided with the `prefill` option, which can be a **string** with the value or a **function** that obtains it. Other options depend on the type of the field, which is defined via the `type` option and defaults to `"text"`. + +Additional sign up fields are rendered below the default fields in the order they are provided. + +> **Note** +> From `11.33.0` onwards, all HTML tags are stripped from user input into custom signup fields. + +#### Text field + +A `validator` function can also be provided. + +```js +var options = { + additionalSignUpFields: [ + { + name: 'address', + placeholder: 'enter your address', + // The following properties are optional + ariaLabel: 'Address', + icon: 'https://example.com/assets/address_icon.png', + prefill: 'street 123', + validator: function (address) { + return { + valid: address.length >= 10, + hint: 'Must have 10 or more chars' // optional + }; + } + } + ] +}; +``` + +If you don't provide a `validator` function a default validator is applied, which requires the text field to contain some value (be non-empty). You can make a field optional by using a validator that always return `true`: + +```js +var options = { + additionalSignUpFields: [ + { + name: 'address', + placeholder: 'enter your address (optional)', + validator: function () { + return true; + } + } + ] +}; +``` + +If you want to save the value of the attribute in the root of your profile, use `storage: 'root'`. Only a subset of values can be stored this way. The list of attributes that can be added to your root profile is [here](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id). By default, every additional sign up field is stored inside the `user_metadata` object. + +```js +var options = { + additionalSignUpFields: [ + { + name: 'name', + storage: 'root' + } + ] +}; +``` + +#### Select field + +To specify a select field `type: "select"` needs to be provided along with the `options` property. + +```js +var options = { + additionalSignUpFields: [ + { + type: 'select', + name: 'location', + placeholder: 'choose your location', + options: [ + { value: 'us', label: 'United States' }, + { value: 'fr', label: 'France' }, + { value: 'ar', label: 'Argentina' } + ], + // The following properties are optional + ariaLabel: 'Location', + icon: 'https://example.com/assets/location_icon.png', + prefill: 'us' + } + ] +}; +``` + +The `options` and the `prefill` value can be provided through a function. + +```js +var options = { + additionalSignUpFields: [ + { + type: 'select', + name: 'location', + placeholder: 'choose your location', + options: function (cb) { + // obtain options, in case of error you call cb with the error in the + // first arg instead of null + cb(null, options); + }, + ariaLabel: 'Location', + icon: 'https://example.com/assets/location_icon.png', + prefill: function (cb) { + // obtain prefill, in case of error you call cb with the error in the + // first arg instead of null + cb(null, prefill); + } + } + ] +}; +``` + +#### Checkbox field + +To specify a checkbox field use: `type: "checkbox"` +The `prefill` value can determine the default state of the checkbox and it is required. + +```js +var options = { + additionalSignUpFields: [ + { + type: 'checkbox', + name: 'newsletter', + prefill: 'true', + placeholder: 'I hereby agree that I want to receive marketing emails from your company', + // placeholderHTML - is an optional field and overrides the value of placeholder + // do not use user inputted data for HTML fields as they are vulnerable to XSS + placeholderHTML: + 'I hereby agree that I want to receive marketing emails from your company', + // ariaLabel - is an optional field + ariaLabel: 'Activate Newsletter' + } + ] +}; +``` + +#### Hidden field + +To specify a hidden field use: `type: "hidden"`. Both the `value` and `name` properties are required. + +```js +var options = { + additionalSignUpFields: [ + { + type: 'hidden', + name: 'signup_code', + value: 'foobar123' + } + ] +}; +``` + +### Avatar provider + +Lock can show avatars fetched from anywhere. A custom avatar provider can be specified with the `avatar` option by passing an object with the keys `url` and `displayName`. Both properties are functions that take an email and a callback function. + +```js +var options = { + avatar: { + url: function (email, cb) { + // obtain URL for email, in case of error you call cb with the error in + // the first arg instead of null + cb(null, url); + }, + displayName: function (email, cb) { + // obtain displayName for email, in case of error you call cb with the + // error in the first arg instead of null + cb(null, displayName); + } + } +}; +``` + +## Popup mode + +A popup window can be displayed instead of redirecting the user to a social provider website. While this has the advantage of preserving page state, it has some issues. Often times users have popup blockers that prevent the login page from even displaying. There are also known issues with mobile browsers. For example, in recent versions of Chrome on iOS, the login popup does not [close properly](https://github.com/auth0/lock/issues/71) after login. For these reasons, we encourage developers to avoid this mode, even with Single Page Apps. + +If you decide to use popup mode you can activate it by passing the option `auth: {redirect: false}` when constructing `Auth0Lock`. + +```js +var clientId = 'YOUR_AUTH0_APP_CLIENTID'; +var domain = 'YOUR_DOMAIN_AT.auth0.com'; +var options = { + auth: { + redirect: false + } +}; + +var lock = new Auth0Lock(clientId, domain, options); +lock.show(); +``` + +More information can be found in [Auth0's documentation](https://auth0.com/docs/libraries/lock/v11/authentication-modes#popup-mode). \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 3b51cbef5..31e4794ef 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,35 +1,11 @@ 'use strict'; const path = require('path'); -const fs = require('fs'); -const tmp = require('tmp'); -const pkg = require('./package'); const webpack = require('webpack'); const webpackConfig = require('./webpack.config.js'); const UnminifiedWebpackPlugin = require('unminified-webpack-plugin'); -const { spawnSync } = require('child_process'); -/** - * This is a helper function to generate valid certs using mkcert. - * If mkcert is not installed it will return false. - */ -function getDevCerts() { - let result = false; - const tmpDir = tmp.dirSync({ unsafeCleanup: true, prefix: 'lock-dev-' }); - - try { - spawnSync('mkcert', ['localhost'], { cwd: tmpDir.name }); - result = { - key: fs.readFileSync(path.join(tmpDir.name, 'localhost-key.pem')), - cert: fs.readFileSync(path.join(tmpDir.name, 'localhost.pem')) - }; - } catch (err) {} - - tmpDir.removeCallback(); - return result; -} - -module.exports = function(grunt) { +module.exports = function (grunt) { const pkg_info = grunt.file.readJSON('package.json'); grunt.initConfig({ @@ -61,8 +37,9 @@ module.exports = function(grunt) { touch_index: 'touch src/index.js' }, webpack: { - options: webpackConfig, build: { + ...webpackConfig, + mode: 'production', devtool: 'source-map', output: { path: path.join(__dirname, 'build'), @@ -80,11 +57,6 @@ module.exports = function(grunt) { } }), new webpack.optimize.AggressiveMergingPlugin(), - new webpack.optimize.UglifyJsPlugin({ - compress: { warnings: false, screw_ie8: true }, - sourceMap: true, - comments: false - }), new UnminifiedWebpackPlugin(), new webpack.BannerPlugin({ raw: false, @@ -98,17 +70,11 @@ module.exports = function(grunt) { }, 'webpack-dev-server': { options: { - webpack: webpackConfig, - publicPath: '/build/' - }, - dev: { - hot: true, - port: 3000, - https: getDevCerts() || true, - webpack: { - devtool: 'source-map' + output: { + publicPath: '/build/' } }, + dev: webpackConfig, design: { webpack: { entry: './support/design/index.js', @@ -146,14 +112,16 @@ module.exports = function(grunt) { grunt.registerTask('prepare_dev', ['clean:dev']); grunt.registerTask('dev', ['prepare_dev', 'webpack-dev-server:dev']); grunt.registerTask('design', ['prepare_dev', 'webpack-dev-server:design']); - grunt.registerMultiTask('i18n', 'Prepares i18n files to be hosted in CDN', function() { + grunt.registerMultiTask('i18n', 'Prepares i18n files to be hosted in CDN', function () { var languages = {}; + var Auth0 = { - registerLanguageDictionary: function(lang, dict) { + registerLanguageDictionary: function (lang, dict) { languages[lang] = dict; } }; - this.files.forEach(function(file) { + + this.files.forEach(function (file) { var filename = file.src[0]; var lang = path.basename(filename, '.js'); var dict = require('./' + filename).default || require('./' + filename); diff --git a/LICENSE b/LICENSE index 0d651713a..cf294db34 100644 --- a/LICENSE +++ b/LICENSE @@ -19,3 +19,26 @@ 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. + +============================================================================ + +Copyright + license attribution for `format` function used in src/utils/format.js: + +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +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. \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..7083e5727 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +#!/usr/bin/env make + +#SHELL := /bin/bash +#.SHELLFLAGS = -ec + +.PHONY: install lint test build cdn-publish + +install: + @echo "Running install..." + yarn install + +test: + @echo "Running test..." + yarn test + +build: + @echo "Running build..." + rm -rf dist && rm -rf build && yarn dist build + +publish: + @echo "Running cdn-publish..." + yarn publish:cdn \ No newline at end of file diff --git a/README.md b/README.md index 468634d8b..307a68d96 100644 --- a/README.md +++ b/README.md @@ -1,118 +1,88 @@ -[![NPM version][npm-image]][npm-url] -[![Build status][circleci-image]][circleci-url] -[![Dependency Status][david-image]][david-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2Flock.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2Flock?ref=badge_shield) +![Auth0's configurable login form for web applications](https://cdn.auth0.com/website/sdks/banners/lock-banner.png) +![Release](https://img.shields.io/npm/v/auth0-lock) +![Downloads](https://img.shields.io/npm/dw/auth0-lock) +[![License](https://img.shields.io/:license-mit-blue.svg?style=flat)](https://opensource.org/licenses/MIT) +![CircleCI](https://img.shields.io/circleci/build/github/auth0/lock) -# Lock +> :warning: Lock is built using React 18 from v12 onwards. Getting issues? Please [submit a bug report](https://github.com/auth0/lock/issues/new?assignees=&labels=bug+report,v12&template=report_a_bug.md&title=). -[Auth0](https://auth0.com) is an authentication broker that supports both social and enterprise identity providers, including Active Directory, LDAP, Google Apps, and Salesforce. +> :warning: From v12 onwards, we no longer publish to Bower. -## Table of Contents -1. [Install](#install) -2. [Cross Origin Authentication](#cross-origin-authentication) -3. [API](#api) -4. [Browser Compatibility](#browser-compatibility) -5. [Issue Reporting](#issue-reporting) -6. [Author](#author) -7. [License](#license) +## Documentation -## Install +- [Docs Site](https://auth0.com/docs) - explore our Docs site and learn more about Auth0. -From CDN +## Getting Started -```html - - -``` +### Browser Compatibility -From [npm](https://npmjs.org) +We ensure browser compatibility in Chrome, Safari, Firefox and IE >= 11. -```sh -npm install auth0-lock -``` +### Installation -Then you can import `Auth0Lock` or `Auth0LockPasswordless` like this: +Install Lock into your project using [npm](https://npmjs.org): -```js -import Auth0Lock from 'auth0-lock'; -// OR -import { Auth0Lock } from 'auth0-lock'; -import { Auth0LockPasswordless } from 'auth0-lock'; +```sh +npm install auth0-lock ``` -After installing the `auth0-lock` module, you'll need to bundle it up along with all of its dependencies. See examples for [browserify](examples/bundling/browserify/) and [webpack](examples/bundling/webpack/). - -> It is expected that you use the development mode when working on your app, and the production mode when deploying your app to the users. -> You can find instructions for building your app for production with different module bundlers [here](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build). - -If you are targeting mobile audiences, we recommended that you add: +From CDN ```html - + + ``` -## Cross-Origin Authentication +### Configure Auth0 -Lock uses **Cross-Origin Authentication**, make sure you understand the considerations you need to take into account by reading the [Cross-Origin Authentication documentation](https://auth0.com/docs/cross-origin-authentication). +Create a **Single Page Application** in the [Auth0 Dashboard](https://manage.auth0.com/#/applications). -## API +> **If you're using an existing application**, verify that you have configured the following settings in your Single Page Application: +> +> - Click on the "Settings" tab of your application's page. +> - Ensure that "Token Endpoint Authentication Method" under "Application Properties" is set to "None" +> - Scroll down and click on the "Show Advanced Settings" link. +> - Under "Advanced Settings", click on the "OAuth" tab. +> - Ensure that "JsonWebToken Signature Algorithm" is set to `RS256` and that "OIDC Conformant" is enabled. +> Next, configure the following URLs for your application under the "Application URIs" section of the "Settings" page: -### new Auth0Lock(clientID, domain, options) +- **Allowed Callback URLs**: `http://localhost:3000` +- **Allowed Logout URLs**: `http://localhost:3000` +- **Allowed Web Origins**: `http://localhost:3000` -Initializes a new instance of `Auth0Lock` configured with your application `clientID` and your account's `domain` at [Auth0](https://manage.auth0.com/). You can find this information in your [application settings](https://manage.auth0.com/#/applications). +> These URLs should reflect the origins that your application is running on. **Allowed Callback URLs** may also include a path, depending on where you're handling the callback (see below). +> Take note of the **Client ID** and **Domain** values under the "Basic Information" section. You'll need these values in the next step. -- **clientId {String}**: Your application _clientId_ in Auth0. -- **domain {String}**: Your Auth0 _domain_. Usually _your-account.auth0.com_. -- **options {Object}**: Allows you to customize the dialog's appearance and behavior. See [below](#customization) for the details. +### Configure the SDK -#### Example +Create either an `Auth0Lock` or `Auth0LockPasswordless` instance, depending on your use case: -```js -var clientId = "YOUR_AUTH0_APP_CLIENTID"; -var domain = "YOUR_DOMAIN_AT.auth0.com"; -var lock = new Auth0Lock(clientId, domain); -var accessToken = null; -var profile = null; - -lock.on("authenticated", function(authResult) { - lock.getUserInfo(authResult.accessToken, function(error, profileResult) { - if (error) { - // Handle error - return; - } +#### Auth0Lock - accessToken = authResult.accessToken; - profile = profileResult; +```js +import { Auth0Lock } from 'auth0-lock'; - // Update DOM - }); -}); +const lock = new Auth0Lock('{YOUR_AUTH0_CLIENT_ID}', '{YOUR_AUTH0_DOMAIN}'); ``` -### new Auth0LockPasswordless(clientID, domain, options) +#### Auth0LockPasswordless -Initializes a new instance of `Auth0LockPasswordless` configured with your application `clientID` and your account's `domain` at [Auth0](https://manage.auth0.com/). You can find this information in your [application settings](https://manage.auth0.com/#/applications). +```js +import { Auth0LockPasswordless } from 'auth0-lock'; -- **clientId {String}**: Your application _clientId_ in Auth0. -- **domain {String}**: Your Auth0 _domain_. Usually _your-account.auth0.com_. -- **options {Object}**: Allows you to customize the dialog's appearance and behavior. See [below](#customization) for the details. +const lock = new Auth0LockPasswordless('{YOUR_AUTH0_CLIENT_ID}', '{YOUR_AUTH0_DOMAIN}'); +``` -If both SMS and email passwordless connections are enabled [in the dashboard](https://manage.auth0.com/#/connections/passwordless), Lock will pick email by default. If you want to conditionally pick email or SMS, use the [`allowedConnections`](#ui-options) option, for example: `allowedConnections: ['sms']`. +### Logging In -For more information, read our [passwordless docs](https://auth0.com/docs/connections/passwordless). +Configure a listener for the `authenticated` event to retrieve an access token and call `show` to display the Lock widget. -#### Example +```html + +``` ```js -var clientId = "YOUR_AUTH0_APP_CLIENTID"; -var domain = "YOUR_DOMAIN_AT.auth0.com"; -var lock = new Auth0LockPasswordless(clientId, domain); -var accessToken = null; -var profile = null; - -lock.on("authenticated", function(authResult) { - lock.getUserInfo(authResult.accessToken, function(error, profileResult) { +lock.on('authenticated', function (authResult) { + lock.getUserInfo(authResult.accessToken, function (error, profileResult) { if (error) { // Handle error return; @@ -124,490 +94,47 @@ lock.on("authenticated", function(authResult) { // Update DOM }); }); -``` - -### getUserInfo(accessToken, callback) - -Once the user has logged in and you are in possession of an access token, you can obtain the profile with `getUserInfo`. - -- **accessToken {String}**: User access token. -- **callback {Function}**: Will be invoked after the user profile has been retrieved. - -#### Example - -```js -lock.getUserInfo(accessToken, function(error, profile) { - if (!error) { - alert("hello " + profile.name); - } -}); -``` - -### on(event, callback) - -Lock will emit events during its lifecycle. - -- `show`: emitted when Lock is shown. Has no arguments. -- `hide`: emitted when Lock is hidden. Has no arguments. -- `unrecoverable_error`: emitted when there is an unrecoverable error, for instance when no connection is available. Has the error as the only argument. -- `authenticated`: emitted after a successful authentication. Has the authentication result as the only argument. -- `authorization_error`: emitted when authorization fails. Has the error as the only argument. -- `hash_parsed`: every time a new Auth0Lock object is initialized in redirect mode (the default), it will attempt to parse the hash part of the URL looking for the result of a login attempt. This is a _low-level_ event for advanced use cases and _authenticated_ and _authorization_error_ should be preferred when possible. After that, this event will be emitted with `null` if it couldn't find anything in the hash. It will be emitted with the same argument as the `authenticated` event after a successful login or with the same argument as `authorization_error` if something went wrong. This event won't be emitted in popup mode because there is no need to parse the URL's hash part. -- `forgot_password ready`: emitted when the "Forgot password" screen is shown. -- `forgot_password submit`: emitted when the user clicks on the submit button of the "Forgot password" screen. -- `signin submit`: emitted when the user clicks on the submit button of the "Login" screen. -- `signup submit`: emitted when the user clicks on the submit button of the "Sign up" screen. -- `signup success`: emitted when the user successfully signs up. -- `signup error`: emitted when signup fails. Has the error as an argument. -- `federated login`: emitted when the user clicks on a social connection button. Has the connection name and the strategy as arguments. -- `sso login`: emitted when the user clicks on an enterprise SSO connection button. Has the lock ID, connection object, and field name as arguments. - -### show(options) - -Displays the widget, allowing you to override some options. - -- **options {Object}**: Allows you to customize some aspect of the dialog's appearance and behavior. The options allowed in here are a subset of the options allowed in the constructor and will override them: `allowedConnections`, `auth.params`, `allowLogin`, `allowSignUp`, `allowForgotPassword`, `initialScreen`, `rememberLastLogin`, `flashMessage` and `languageDictionary`. See [below](#customization) for the details. Keep in mind that `auth.params` will be fully replaced and not merged. - -#### Example - -```js -// without options -lock.show(); - -// will override the allowedConnections option passed to the constructor, if any -lock.show({allowedConnections: ["twitter", "facebook"]}) - -// will override the entire auth.params object passed to the constructor, if any -lock.show({auth: {params: {state: 'auth_state'}}}) -``` - -### resumeAuth(hash, callback) - -If you set the [auth.autoParseHash](#authentication-options) option to `false`, you'll need to call this method to complete the authentication flow. This method is useful when you're using a client-side router that uses a `#` to handle URLs (angular2 with `useHash` or react-router with `hashHistory`). -- **hash {String}**: The hash fragment received from the redirect. -- **callback {Function}**: Will be invoked after the parse is done. Has an error (if any) as the first argument and the authentication result as the second one. If there is no hash available, both arguments will be `null`. - -#### Example - -```js -lock.resumeAuth(hash, function(error, authResult) { - if (error) { - alert("Could not parse hash"); - } - console.log(authResult.accessToken); -}); -``` - -### logout(options) -Logs out the user. - -- **options {Object}**: This is optional and follows the same rules as [this](https://auth0.com/docs/libraries/auth0js#logout). - -#### Example - -```js -lock.logout({ returnTo: 'https://myapp.com/bye-bye' }); +// Show the widget when the login button is clicked +document.getElementById('login').addEventListener('click', () => { + lock.show() +});. ``` -### checkSession(params, callback) - -The checkSession method allows you to acquire a new token from Auth0 for a user who is already authenticated against the universal login page for your domain. The method accepts any valid OAuth2 parameters that would normally be sent to authorize. In order to use this method, you have to enable Web Origins for your application. For more information, see [Using checkSession to acquire new tokens](https://auth0.com/docs/libraries/auth0js#using-checksession-to-acquire-new-tokens). -- **params {Object}**: OAuth2 params object to send to Auth0's servers. -- **callback {Function}**: Will be invoked after the response from the server is returned. Has an error (if any) as the first argument and the authentication result as the second one. - -#### Example - -```js -lock.checkSession({}, function (error, authResult) { - if (error || !authResult) { - lock.show(); - } else { - // user has an active session, so we can use the accessToken directly. - lock.getUserInfo(authResult.accessToken, function (error, profile) { - console.log(error, profile); - }); - } -}); -``` - -### Customization - -The appearance of the widget and the mechanics of authentication can be customized with an `options` object which has one or more of the following properties. Each method that opens the dialog can take an `options` object as its first argument. - -#### UI options - -- **allowedConnections {Array}**: List of connection that will be available to perform the authentication. It defaults to all enabled connections. -- **autoclose {Boolean}**: Determines whether or not the Lock will be closed automatically after a successful sign in. If the Lock is not `closable` it won't be closed even if this option is set to `true`. Defaults to `false`. -- **autofocus {Boolean}**: Determines whether or not the first input on the screen, that is the email or phone number input, should have focus when the Lock is displayed. Defaults to `false` when a `container` option is provided or the Lock is being rendered on a mobile device. Otherwise, it defaults to `true`. -- **avatar {Object}**: Determines whether or not an avatar and a username should be displayed on the Lock's header once an email or username has been entered and how to obtain it. By default avatars are fetched from [Gravatar](https://gravatar.com/). Supplying `null` will disable the functionality. To fetch avatar from other provider see [below](#avatar-provider). -- **container {String}**: The `id` of the HTML element where the Lock will be rendered. This makes the Lock appear inline instead of in a modal window. -- **language {String}**: Specifies the language of the widget. Defaults to `"en"`. Supported languages are: - - `de`: German - - `en`: English - - `es`: Spanish - - `it`: Italian - - `nb`: Norwegian bokmål - - `pt-BR`: Brazilian Portuguese - - `ru`: Russian - - `zh`: Chinese - - `ja`: Japanese - - [Check all the available languages](https://github.com/auth0/lock/tree/master/src/i18n) -- **languageDictionary {Object}**: Allows you to customize every piece of text displayed in the Lock. Defaults to `{}`. See below [Language Dictionary Specification](#language-dictionary-specification) for the details. -- **closable {Boolean}**: Determines whether or not the Lock can be closed. When a `container` option is provided its value is always `false`, otherwise it defaults to `true`. -- **popupOptions {Object}**: Allows you to customize the location of the popup in the screen. Any [position and size feature](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Position_and_size_features) allowed by `window.open` is accepted. Defaults to `{}`. -- **rememberLastLogin {Boolean}**: Determines whether or not to show a screen that allows you to quickly log in with the account you used the last time when the `initialScreen` option is set to `"login"` (the default). Defaults to `true`. -- **flashMessage {Object}**: Shows an `error` or `success` flash message when Lock is shown. - + **type {String}**: The message type, it should be `error` or `success`. - + **text {String}**: The text to show. -- **allowAutocomplete {Boolean}**: Determines whether or not the email or username inputs will allow autocomplete (``). Defaults to `false`. -- **scrollGlobalMessagesIntoView {Boolean}**: Determines whether or not a globalMessage should be scrolled into the user's viewport. Defaults to `true`. -- **allowShowPassword {Boolean}**: Determines whether or not add a checkbox to show the password when typing it. Defaults to `false`. -- **allowPasswordAutocomplete {Boolean}**: Determines whether the password field will allow autocomplete; setting this to `true` is required for password manager support and to avoid many cases of adverse behavior. Defaults to `false`. -- **preferConnectionDisplayName {Boolean}**: If true, Lock will try to use the connection display name as configured in the manage dashboard, if available. - - -#### Theming options - -Theme options are grouped in the `theme` property of the `options` object. - -```js -var options = { - theme: { - labeledSubmitButton: false, - logo: "https://example.com/assets/logo.png", - primaryColor: "green", - authButtons: { - connectionName: { - displayName: "...", - primaryColor: "...", - foregroundColor: "...", - icon: "https://.../logo.png" - } - } - } -}; -``` - -- **labeledSubmitButton {Boolean}**: Indicates whether or not the submit button should have a label. Defaults to `true`. When set to `false` an icon will be shown. The labels can be customized through the `languageDictionary`. -- **logo {String}**: Url for an image that will be placed in the Lock's header. Defaults to Auth0's logo. -- **primaryColor {String}**: Defines the primary color of the Lock, all colors used in the widget will be calculated from it. This option is useful when providing a custom `logo` to ensure all colors go well together with the logo's color palette. Defaults to `"#ea5323"`. -- **authButtons {Object}**: Allows the customization of the custom oauth2 login buttons. - + **displayName {String}**: The name to show instead of the connection name. - + **primaryColor {String}**: The button's background color. Defaults to `"#eb5424"`. - + **foregroundColor {String}**: The button's text color. Defaults to `"#FFFFFF"`. - + **icon {String}**: The icon's url for the connection. For example:`"https://site.com/logo.png"`. - -#### Authentication options - -Authentication options are grouped in the `auth` property of the `options` object. The default scope used by Lock is `openid profile email`. - -```js -var options = { - auth: { - params: { - param1: "value1", - scope: "openid profile email" - }, - autoParseHash: true, - redirect: true, - redirectUrl: "some url", - responseMode: "form_post", - responseType: "token", - sso: true, - connectionScopes: { - connectionName: [ 'scope1', 'scope2' ] - } - } -}; -``` - -- **params {Object}**: Specifies extra parameters that will be sent when starting a login. Defaults to `{}`. -- **autoParseHash {Boolean}**: When set to `true`, Lock will parse the `window.location.hash` string when instantiated. If set to `false`, you'll have to manually resume authentication using the [resumeAuth](#resumeauthhash-callback) method. -- **redirect {Boolean}**: When set to `true`, the default, _redirect mode_ will be used. Otherwise, _popup mode_ is chosen. See [below](#popup-mode) for more details. -- **redirectUrl {String}**: The URL Auth0 will redirect back to after authentication. Defaults to the empty string `""` (no redirect URL). -- **responseMode {String}**: Should be set to `"form_post"` if you want the code or the token to be transmitted via an HTTP POST request to the `redirectUrl` instead of being included in its query or fragment parts. Otherwise, it should be omitted. -- **responseType {String}**: Should be set to `"token"` for Single Page Applications, and `"code"` otherwise. Also, `"id_token"` is supported for the first case. Defaults to `"code"` when `redirectUrl` is provided, and to `"token"` otherwise. -- **sso {Boolean}**: Determines whether Single Sign-On is enabled or not in **Lock**. The Auth0 SSO session will be created regardless of this option if SSO is enabled for your application or tenant. -- **connectionScopes {Object}**: Allows you to set scopes to be sent to the oauth2/social/enterprise connection for authentication. - -#### Database options - -- **additionalSignUpFields {Array}**: Allows you to provide extra input fields during sign up. See [below](#additional-sign-up-fields) more for details. Defaults to `[]`. -- **allowLogin {Boolean}**: When set to `false` the widget won't display the _login screen_. This is useful if you want to use the widget just for signups (the _login and sign up tabs_ in the _sign up screen_ will be hidden) or to reset passwords (the _back button_ in the _forgot password screen_ will be hidden). In such cases you may also need to specify the `initialScreen`, `allowForgotPassword` and `allowSignUp` options. It defaults to `true`. -- **allowForgotPassword {Boolean}**: When set to `false` hides the _"Don't remember your password?"_ link in the _login screen_, making the _forgot password screen_ unreachable. Defaults to `true`. Keep in mind that if you are using a database connection with a _custom database_ which doesn't have a _change password script_ the forgot password screen won't be available. -- **allowSignUp {Boolean}**: When set to `false` hides the _login and sign up tabs_ in the _login screen_, making the _sign up screen_ unreachable. Defaults to `true`. Keep in mind that if the database connection has sign ups _disabled_ or you are using a _custom database_ which doesn't have a _create script_, then the sign up screen won't be available. -- **defaultDatabaseConnection {String}**: Specifies the database connection that will be used when there is more than one available. -- **initialScreen {String}**: Name of the screen that will be shown when the widget is opened. Valid values are `"login"`, `"signUp"`, and `"forgotPassword"`. If this option is left unspecified, the widget will pick the first screen that is available from the previous list. If you set `initialScreen` to `"forgotPassword"` we recommend that you set `allowLogin` to `"false"`, otherwise a back button will be shown in the forgot password screen and it might not be clear to the user where that back button will take them. -- **loginAfterSignUp {Boolean}**: Determines whether or not the user will be automatically signed in after a successful sign up. Defaults to `true`. -- **forgotPasswordLink {String}**: URL for a page that allows the user to reset her password. When set to a non-empty string, the user will be linked to the provided URL when clicking the _"Don't remember your password?"_ link in the _login screen_. -- **showTerms {Boolean}**: When set to `true` displays the `languageDictionary.signUpTerms` string. Defaults to `true`. -- **mustAcceptTerms {Boolean}**: When set to `true` displays a checkbox input along with the terms and conditions that must be checked before signing up. The terms and conditions can be specified via the `languageDictionary` option, see the example below. Defaults to `false`. -- **prefill {Object}**: Allows you to set the initial value for the _email_ and/or _username_ inputs, e.g. `{prefill: {email: "someone@auth0.com", username: "someone"}}`. When omitted no initial value will be provided. -- **signUpLink {String}**: URL for a page that allows the user to sign up. When set to a non-empty string, the user will be linked to the provided URL when clicking the _sign up_ tab in the _login screen_. -- **usernameStyle {String}**: Determines what will be used to identify the user for a Database connection that has the `requires_username` flag set, otherwise it will be ignored. Possible values are `"username"` and `"email"` and by default both `username` and `email` are allowed. -- **signUpHideUsernameField {Boolean}**: When set to `true` hides the _username_ input during sign up for a Database connection that has the `requires_username` flag set. Defaults to `false`. - -#### Enterprise options - -- **defaultEnterpriseConnection {String}**: Specifies the enterprise connection which allows you to log in using a username and a password that will be used when there is more than one available or there is a database connection. If a `defaultDatabaseConnection` is provided the database connection will be used and this option will be ignored. - -#### Example - -```js -var options = { - container: "myContainer", - closable: false, - languageDictionary: { - signUpTerms: "I agree to the terms of service and privacy policy.", - title: "My Company", - }, - autofocus: false -}; -``` - -#### Passwordless options - -- **passwordlessMethod {String}**: When using `Auth0LockPasswordless` with an email connection, you can use this option to pick between sending a [code](https://auth0.com/docs/connections/passwordless/spa-email-code) or a [magic link](https://auth0.com/docs/connections/passwordless/spa-email-link) to authenticate the user. Available values for email connections are `code` and `link`. Defaults to `code`. SMS passwordless connections will always use `code`. - -#### Other options - -- **configurationBaseUrl {String}**: Overrides application settings base URL. By default it uses Auth0's CDN URL when the `domain` has the format `*.auth0.com`. Otherwise, it uses the provided `domain`. -- **languageBaseUrl {String}**: Overrides the language source URL for Auth0's provided translations. By default it uses to Auth0's CDN URL `https://cdn.auth0.com`. -- **hashCleanup {Boolean}**: When enabled, it will remove the hash part of the callback URL after the user authentication. Defaults to `true`. -- **connectionResolver {Function}**: When in use, provides an extensibility point to make it possible to choose which connection to use based on the username information. Has `username`, `context`, and `callback` as parameters. The callback expects an object like: `{type: 'database', name: 'connection name'}`. **This only works for database connections.** Keep in mind that this resolver will run in the form's `onSubmit` event, so keep it simple and fast. **This is a beta feature. If you find a bug, please open a GitHub [issue](https://github.com/auth0/lock/issues/new).** - -```js -var options = { - connectionResolver: function (username, context, cb) { - var domain = username.includes('@') && username.split('@')[1]; - if (domain) { - // If the username is test@auth0.com, the connection used will be the `auth0.com` connection. - // Make sure you have a database connection with the name `auth0.com`. - cb({ type: 'database', name: domain }); - } else { - // Use the default approach to figure it out the connection - cb(null); - } - } -} -``` - -#### Language Dictionary Specification - -A language dictionary is an object that allows you to customize every piece of text the Lock needs to display. For instance, the following code will change the title displayed in the header and the placeholder for the email field. - -```js -var options = { - languageDictionary: { - emailInputPlaceholder: "Please enter your email", - title: "My Company" - }, -}; -``` - -#### Additional sign up fields - -Extra input fields can be added to the sign up screen with the `additionalSignUpFields` option. Every input must have a `name` and a `placeholder`, and an `icon` URL can also be provided. Also, the initial value can be provided with the `prefill` option, which can be a **string** with the value or a **function** that obtains it. Other options depend on the type of the field, which is defined via the `type` option and defaults to `"text"`. - -Additional sign up fields are rendered below the default fields in the order they are provided. - -##### Text field - -A `validator` function can also be provided. - -```js -var options = { - additionalSignUpFields: [{ - name: "address", - placeholder: "enter your address", - // The following properties are optional - ariaLabel: "Address", - icon: "https://example.com/assests/address_icon.png", - prefill: "street 123", - validator: function(address) { - return { - valid: address.length >= 10, - hint: "Must have 10 or more chars" // optional - }; - } - }] -}; -``` - -If you don't provide a `validator` function a default validator is applied, which requires the text field to contain some value (be non-empty). You can make a field optional by using a validator that always return `true`: - -```js -var options = { - additionalSignUpFields: [{ - name: "address", - placeholder: "enter your address (optional)", - validator: function() {return true;} - }] -}; -``` - -If you want to save the value of the attribute in the root of your profile, use `storage: 'root'`. Only a subset of values can be stored this way. The list of attributes that can be added to your root profile is [here](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id). By default, every additional sign up field is stored inside the `user_metadata` object. - -```js -var options = { - additionalSignUpFields: [{ - name: "name", - storage: "root" - }] -}; -``` - -##### Select field - -To specify a select field `type: "select"` needs to be provided along with the `options` property. - -```js -var options = { - additionalSignUpFields: [{ - type: "select", - name: "location", - placeholder: "choose your location", - options: [ - {value: "us", label: "United States"}, - {value: "fr", label: "France"}, - {value: "ar", label: "Argentina"} - ], - // The following properties are optional - ariaLabel: "Location", - icon: "https://example.com/assests/location_icon.png", - prefill: "us" - }] -} -``` - -The `options` and the `prefill` value can be provided through a function. - -```js -var options = { - additionalSignUpFields: [{ - type: "select", - name: "location", - placeholder: "choose your location", - options: function(cb) { - // obtain options, in case of error you call cb with the error in the - // first arg instead of null - cb(null, options); - }, - ariaLabel: "Location", - icon: "https://example.com/assests/location_icon.png", - prefill: function(cb) { - // obtain prefill, in case of error you call cb with the error in the - // first arg instead of null - cb(null, prefill); - } - }] -} -``` - -##### Checkbox field - -To specify a checkbox field use: `type: "checkbox"` -The `prefill` value can determine the default state of the checkbox and it is required. - -```js -var options = { - additionalSignUpFields: [{ - type: "checkbox", - name: "newsletter", - prefill: "true", - placeholder: "I hereby agree that I want to receive marketing emails from your company", - // placeholderHTML - is an optional field and overrides the value of placeholder - placeholderHTML: "I hereby agree that I want to receive marketing emails from your company", - // ariaLabel - is an optional field - ariaLabel: "Activate Newsletter" - }] -} -``` - -##### Hidden field - -To specify a hidden field use: `type: "hidden"`. Both the `value` and `name` properties are required. - -```js -var options = { - additionalSignUpFields: [{ - type: "hidden", - name: "signup_code", - value: "foobar123" - }] -} -``` - -#### Avatar provider - -Lock can show avatars fetched from anywhere. A custom avatar provider can be specified with the `avatar` option by passing an object with the keys `url` and `displayName`. Both properties are functions that take an email and a callback function. - -```js -var options = { - avatar: { - url: function(email, cb) { - // obtain URL for email, in case of error you call cb with the error in - // the first arg instead of null - cb(null, url); - }, - displayName: function(email, cb) { - // obtain displayName for email, in case of error you call cb with the - // error in the first arg instead of null - cb(null, displayName); - } - } -}; -``` - -### Popup mode - -A popup window can be displayed instead of redirecting the user to a social provider website. While this has the advantage of preserving page state, it has some issues. Often times users have popup blockers that prevent the login page from even displaying. There are also known issues with mobile browsers. For example, in recent versions of Chrome on iOS, the login popup does not [close properly](https://github.com/auth0/lock/issues/71) after login. For these reasons, we encourage developers to avoid this mode, even with Single Page Apps. - -If you decide to use popup mode you can activate it by passing the option `auth: {redirect: false}` when constructing `Auth0Lock`. - -```js -var clientId = "YOUR_AUTH0_APP_CLIENTID"; -var domain = "YOUR_DOMAIN_AT.auth0.com"; -var options = { - auth: { - redirect: false - } -}; - -var lock = new Auth0Lock(clientId, domain, options); -lock.show(); -``` - -More information can be found in [Auth0's documentation](https://auth0.com/docs/libraries/lock/v11/authentication-modes#popup-mode). - -## Browser Compatibility +For other comprehensive examples and documentation on the configuration options, see the [EXAMPLES.md](https://github.com/auth0/lock/blob/master/EXAMPLES.md) document. -We ensure browser compatibility in Chrome, Safari, Firefox and IE >= 10. We currently use [zuul](https://github.com/defunctzombie/zuul) along with [Saucelabs](https://saucelabs.com) to run integration tests on each push. +## Feedback -## Issue Reporting +### Contributing -If you have found a bug or if you have a feature request, please report them at this repository issues section. 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. +We appreciate feedback and contribution to this repo! Before you get started, please see the following: -## Author +- [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) +- [This repo's contribution guide](https://github.com/auth0/lock/blob/master/DEVELOPMENT.md) -[Auth0](https://auth0.com) +### Raise an issue -## License +:warning: Note: We are no longer supporting requests for new features. Only requests for bug fixes or security patches will be considered. -This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. +To provide feedback or report a bug, please [raise an issue on our issue tracker](https://github.com/auth0/lock/issues). +### Vulnerability Reporting -[circleci-image]: https://img.shields.io/circleci/project/github/auth0/lock.svg?style=flat-square -[circleci-url]: https://circleci.com/gh/auth0/lock/tree/master -[npm-image]: https://img.shields.io/npm/v/auth0-lock.svg?style=flat-square -[npm-url]: https://npmjs.org/package/auth0-lock -[license-image]: https://img.shields.io/npm/l/auth0-lock.svg?style=flat-square -[license-url]: #license -[downloads-image]: https://img.shields.io/npm/dm/auth0-lock.svg?style=flat-square -[downloads-url]: https://npmjs.org/package/auth0-lock -[david-image]: https://david-dm.org/auth0/lock/status.svg?style=flat-square -[david-url]: https://david-dm.org/auth0/lock +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. +## What is Auth0? -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2Flock.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2Flock?ref=badge_large) +

+ + + + 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. +

diff --git a/bower.json b/bower.json deleted file mode 100644 index 90ee02fe4..000000000 --- a/bower.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "auth0-lock", - "version": "11.28.0", - "main": "build/lock.js", - "ignore": [ - "lib-cov", - "*.seed", - "*.log", - "*.csv", - "*.dat", - "*.out", - "*.pid", - "*.gz", - "pids", - "logs", - "results", - "npm-debug.log", - "bin" - ] -} diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 3a3825181..000000000 --- a/circle.yml +++ /dev/null @@ -1,19 +0,0 @@ -machine: - node: - version: v6.10.0 - environment: - PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" -dependencies: - override: - - yarn - cache_directories: - - ~/.cache/yarn -test: - pre: - - yarn run build - override: - - yarn run test:cli - - yarn run test:jest -general: - artifacts: - - build \ No newline at end of file diff --git a/css/index.styl b/css/index.styl index 443dc7ee4..19b8ec5fd 100644 --- a/css/index.styl +++ b/css/index.styl @@ -22,6 +22,10 @@ loadingSize = 30px display block!important + +.auto-height + height auto !important + // Lock base style @@ -182,9 +186,6 @@ loadingSize = 30px +breakpoint("mobile") overflow-x inherit - .auth0-lock-content-body-wrapper - padding-top 10px - .auth0-lock-close-button, .auth0-lock-back-button -webkit-box-sizing content-box !important -moz-box-sizing content-box !important @@ -534,7 +535,9 @@ loadingSize = 30px -webkit-appearance: none !important; appearance: none !important; - &[data-provider^=google] + &[data-provider^=google], + &[data-provider^=windowslive], + &[data-provider^=microsoft] .auth0-lock-social-button-text color: #333 !important diff --git a/css/social_icons.styl b/css/social_icons.styl index 9b1d238da..8ef052f6e 100644 --- a/css/social_icons.styl +++ b/css/social_icons.styl @@ -45,6 +45,9 @@ .auth0-lock-social-button[data-provider="oauth2"] { background-color: #eb5424; } +.auth0-lock-social-button[data-provider="okta"] { + background-color: #000; +} .auth0-lock-social-button[data-provider="paypal"] { background-color: #009cde; } @@ -181,6 +184,9 @@ .auth0-lock-social-button[data-provider^=oauth2] .auth0-lock-social-button-icon { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxNTAuMSAxNjcuOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTUwLjEgMTY3LjgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBvbHlnb24gZmlsbD0iI0ZGRkZGRiIgcG9pbnRzPSIzMSwxMzUuOCAzMC45LDEzNS44IDc1LjEsMTY3LjggMTE5LjIsMTM1LjggNzUuMSwxMDMuNyAJIi8+DQoJPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTMuNyw1MS45TDMuNyw1MS45Qy02LjYsODMuNiw1LjMsMTE3LjIsMzEsMTM1LjhsMCwwbDE2LjktNTEuOUwzLjcsNTEuOWw1NC41LDBMNzUuMSwwbDAsMEgyMC41TDMuNyw1MS45eg0KCQkiLz4NCgk8cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNMTQ2LjUsNTEuOUwxNDYuNSw1MS45TDE0Ni41LDUxLjlMMTI5LjYsMEg3NS4xbDAsMGwxNi45LDUxLjlMMTQ2LjUsNTEuOWwtNDQuMSwzMi4xbDE2LjgsNTEuOQ0KCQlDMTQ2LjIsMTE2LjIsMTU2LjMsODIsMTQ2LjUsNTEuOXoiLz4NCjwvZz4NCjwvc3ZnPg0K"); } +.auth0-lock-social-button[data-provider^=okta] .auth0-lock-social-button-icon { + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjE3NC4yMSAxNzUuMzQgNjczLjMzIDY3My4zMSI+PGc+PHBhdGggZD0ibTU0NC42IDE4MC4xMS0xMy44MiAxNzAuNTQuMDIuMDJjLTYuNTQtLjgtMTMuMTYtMS4yNS0xOS45MS0xLjI1LTguNCAwLTE2LjY3LjY0LTI0LjczIDEuODdsLTcuODUtODIuN2MtLjI0LTIuNTggMS44LTQuODQgNC40MS00LjhoMTQuMTNsLTYuODEtODMuNjdjLS4yMy0yLjU2IDEuOC00Ljc4IDQuMzktNC43OGg0NS43OGMyLjU2IDAgNC41OSAyLjIxIDQuMzkgNC43OFptLTExNS41NCA4LjQ3Yy0uNjgtMi40OC0zLjM0LTMuODYtNS43Ni0yLjk3bC00My4wMiAxNS42N2MtMi40Mi44OC0zLjU3IDMuNjUtMi41IDUuOTlsMzUgNzYuMjktMTMuMjkgNC44Yy0yLjQ0Ljg4LTMuNjEgMy42OS0yLjQ4IDYuMDVsMzUuNjYgNzUuMDNhMTYwLjgxMSAxNjAuODExIDAgMCAxIDQxLjcyLTE1Ljg3bC00NS4zMy0xNjQuOThaTTMyMy40IDIzNi4wN2w5OS4wMSAxMzkuNTEuMDIuMDJhMTYzLjU5NCAxNjMuNTk0IDAgMCAwLTMzLjc1IDI5LjIybC01OS4yMi01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xN2wtODIuODUtNi42NWMtLjMzIDE1LjMyLTIuNzUgMzAuMTEtNy4wMSA0NC4wOWwxNjUuNDkgNDMuMjF2LjAyWm0tNDQuMDggMTAyLjg4Yy0xLjI5IDIuMjItNC4yMiAyLjg3LTYuMzMgMS40MWwuMDItLjAyLTE0MC43Ni05Ny4yMmM4Ljk0LTExLjgzIDE2LjI2LTI0LjkzIDIxLjczLTM4Ljk4bDc1LjU2IDM0LjU2YzIuMzggMS4wOSAzLjMgMy45OCAxLjk5IDYuMjNsLTcuMSAxMi4yMiA3NS44NSAzNS45NWMyLjMyIDEuMTEgMy4yMiAzLjk2IDEuOTMgNi4xOWwtMjIuODggMzkuNjZabS0xODguNDEtNTcuMzQgOTkuMDEgMTM5LjUzYTQuNDI0IDQuNDI0IDAgMCAwIDYuNDQuODJsMzUuMDYtMjkuNDVjMS45Ny0xLjY2IDIuMTEtNC42Ni4zMS02LjQ4bC01OC45Ny01OS43MSAxMC44My05LjA2YzEuOTktMS42NiAyLjEzLTQuNy4yNy02LjUybC01OS4yMS01OC4zNGExNjMuMjk0IDE2My4yOTQgMCAwIDEtMzMuNzUgMjkuMjJoLjAyWm0tLjg2IDE4OS45OGMtMi40Mi44OC01LjA5LS40OS01Ljc2LTIuOTdMNTQ3LjM2IDY3MC40YTE2MS4yNCAxNjEuMjQgMCAwIDAgNDEuNzMtMTUuODdsMzUuNjUgNzUuMDNjMS4xMyAyLjM2LS4wNCA1LjE3LTIuNDggNi4wNWwtMTMuMjkgNC44IDM1IDc2LjI5YzEuMDcgMi4zNC0uMDggNS4xMS0yLjUgNS45OWwtNDMuMDIgMTUuNjdaIiBzdHlsZT0iZmlsbDojZmZmO2ZpbGwtcnVsZTpldmVub2RkIi8+PHBhdGggZD0iTTAgMGgxMDI0djEwMjRIMHoiIHN0eWxlPSJmaWxsOm5vbmUiLz48L2c+PC9zdmc+"); +} .auth0-lock-social-button[data-provider^=paypal] .auth0-lock-social-button-icon { background-image: url("data:image/svg+xml;base64,PD94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S4zNzYgNDAuMDYzLDE5LjUwMSA0MCwxOS42ODggQzM5LjkzNywxOS44NzUgMzkuOTM3LDIwLjAwMSAzOS45MzcsMjAuMDYzIEMzOS40MzcsMjIuMTg4IDM4LjM3NCwyMy45MzggMzYuNTYyLDI1LjQzOCBDMzQuODEyLDI2LjkzOCAzMi44NzQsMjcuNzUxIDMwLjg3NCwyNy44MTMgTDMwLjg3NSwyNy44MTMgWiIgaWQ9IlNoYXBlIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="); } @@ -216,11 +222,9 @@ .auth0-lock-social-button[data-provider^=vkontakte] .auth0-lock-social-button-icon { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9Ijc5cHgiIGhlaWdodD0iNDZweCIgdmlld0JveD0iMCAwIDc5IDQ2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnNrZXRjaD0iaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoL25zIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMy40ICgxNTU4OCkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+dms8L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlP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MDUgNC42MjEsMi44MDUgNC4xODMsMi44MDUgTDMuNjIsMi44MDUgQzMuMTIsMi44MDUgMi42MiwyLjg2OCAxLjk5NSwzLjA1NSBDMS4zNywzLjI0MiAwLjg3LDMuNDkzIDAuNDMyLDMuODA1IEwwLjQzNywzLjgxMyBaIiBpZD0iU2hhcGUiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="); } -.auth0-lock-social-button[data-provider^=windowslive] .auth0-lock-social-button-icon { - background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjY0cHgiIGhlaWdodD0iNjRweCIgdmlld0JveD0iMCAwIDY0IDY0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnNrZXRjaD0iaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoL25zIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMy40ICgxNTU4OCkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+d2luZG93czwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPgogICAgICAgIDxnIGlkPSJ3aW5kb3dzIiBza2V0Y2g6dHlwZT0iTVNMYXllckdyb3VwIiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLjA0NSwwLjA0NSBMMjguNzQ3LDAuMDQ1IEwyOC43NDcsMjguNzQ3IEwwLjA0NSwyOC43NDcgTDAuMDQ1LDAuMDQ1IEwwLjA0NSwwLjA0NSBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0zNC40MywwLjA0NSBMNjMuMTMyLDAuMDQ1IEw2My4xMzIsMjguNzQ3IEwzNC40MywyOC43NDcgTDM0LjQzLDAuMDQ1IEwzNC40MywwLjA0NSBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yOC43NDgsMzUuMjU0IEwyOC43NDgsNjMuOTU2IEwwLjA0Niw2My45NTYgTDAuMDQ2LDM1LjI1NCBMMjguNzQ4LDM1LjI1NCBMMjguNzQ4LDM1LjI1NCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0zNC40MywzNS4yNTQgTDYzLjEzMiwzNS4yNTQgTDYzLjEzMiw2My45NTYgTDM0LjQzLDYzLjk1NiBMMzQuNDMsMzUuMjU0IEwzNC40MywzNS4yNTQgWiIgaWQ9IlNoYXBlIj48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo="); -} +.auth0-lock-social-button[data-provider^=windowslive] .auth0-lock-social-button-icon, .auth0-lock-social-button[data-provider^=windows] .auth0-lock-social-button-icon { - background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8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yOC43NDcgTDM0LjQzLDAuMDQ1IEwzNC40MywwLjA0NSBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yOC43NDgsMzUuMjU0IEwyOC43NDgsNjMuOTU2IEwwLjA0Niw2My45NTYgTDAuMDQ2LDM1LjI1NCBMMjguNzQ4LDM1LjI1NCBMMjguNzQ4LDM1LjI1NCBaIiBpZD0iU2hhcGUiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0zNC40MywzNS4yNTQgTDYzLjEzMiwzNS4yNTQgTDYzLjEzMiw2My45NTYgTDM0LjQzLDYzLjk1NiBMMzQuNDMsMzUuMjU0IEwzNC40MywzNS4yNTQgWiIgaWQ9IlNoYXBlIj48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="); + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMSIgaGVpZ2h0PSIyMSIgdmlld0JveD0iMCAwIDIxIDIxIj48dGl0bGU+TVMtU3ltYm9sTG9ja3VwPC90aXRsZT48cmVjdCB4PSIxIiB5PSIxIiB3aWR0aD0iOSIgaGVpZ2h0PSI5IiBmaWxsPSIjZjI1MDIyIi8+PHJlY3QgeD0iMSIgeT0iMTEiIHdpZHRoPSI5IiBoZWlnaHQ9IjkiIGZpbGw9IiMwMGE0ZWYiLz48cmVjdCB4PSIxMSIgeT0iMSIgd2lkdGg9IjkiIGhlaWdodD0iOSIgZmlsbD0iIzdmYmEwMCIvPjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjkiIGhlaWdodD0iOSIgZmlsbD0iI2ZmYjkwMCIvPjwvc3ZnPg=="); } .auth0-lock-social-button[data-provider^=wordpress] .auth0-lock-social-button-icon { background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iM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TguMDAzLDE2LjM3NiAxNy42MjgsMTYuMTg4IDE3LjA2NiwxNi4yNTEgQzEzLjg3OCwxNi41MDEgMTEuMjUzLDE2LjYyNiA5LjE5MSwxNi42MjYgTDcuMzE2LDE2LjYyNiBMNy4zMTMsMTYuNjI1IFogTTIzLjY4OCw2MS4xODggTDMyLjUwMSwzNS4zNzUgTDQxLjYyNiw2MC4yNSBMNDEuODE0LDYwLjYyNSBDMzguNjg5LDYxLjc1IDM1LjQzOSw2Mi4zMTMgMzIuMDAxLDYyLjMxMyBDMjkuMTI2LDYyLjMxMyAyNi4zMTMsNjEuOTM4IDIzLjY4OCw2MS4xODggTDIzLjY4OCw2MS4xODggWiBNNDYuODc1LDU4LjM3NSBMNTUuODc1LDMyLjI1IEM1Ny4zNzUsMjcuODc1IDU4LjEyNSwyNC4zNzUgNTguMTI1LDIxLjY4NyBDNTguMTI1LDIwLjU2MiA1OC4wNjIsMTkuNTYyIDU3LjkzNywxOC42ODcgQzYwLjMxMiwyMyA2MS41LDI3LjY4NyA2MS41LDMyLjgxMiBDNjEuNSwzOC4xMjUgNjAuMTg3LDQzLjA2MiA1Ny41NjIsNDcuNjI1IEM1NC44NzQsNTIuMTg4IDUxLjMxMiw1NS43NSA0Ni44NzQsNTguMzc1IEw0Ni44NzUsNTguMzc1IFoiIGlkPSJTaGFwZSIgc2tldGNoOnR5cGU9Ik1TU2hhcGVHcm91cCI+PC9wYXRoPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"); diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 000000000..7f53d87a7 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,123 @@ +module.exports = function (config) { + process.env.CHROME_BIN = require('puppeteer').executablePath(); + + config.set({ + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + // frameworks to use + frameworks: ['mocha', 'browserify'], + + //plugins + plugins: [ + 'karma-mocha', + 'karma-babel-preprocessor', + 'karma-browserstack-launcher', + 'karma-chrome-launcher', + 'karma-browserify', + 'karma-mocha-reporter' + ], + + // list of files / patterns to load in the browser + files: [ + 'test/**/*.test.js', + 'test/setup.js', + { + pattern: 'src/!(__tests__)/**/*.jsx?', + type: 'js' + } + ], + + preprocessors: { + 'src/!(__tests__)/**/*.jsx?': ['browserify'], + 'test/**/*.js': ['browserify'] + }, + + browserify: { + debug: true, + transform: ['babelify'], + extensions: ['.js', '.jsx'] + }, + + // test results reporter to use + reporters: ['mocha', 'BrowserStack'], + + // web server port + port: 9876, + + // enable / disable colors in the output (reporters and logs) + colors: true, + + singleRun: true, + + browserNoActivityTimeout: 60000, + + browserDisconnectTimeout: 30000, + + browserDisconnectTolerance: 10, + + // level of logging + logLevel: config.LOG_INFO, + + browserStack: { + username: process.env.BROWSERSTACK_USERNAME, + accessKey: process.env.BROWSERSTACK_ACCESS_KEY, + name: 'Lock.js Browser Tests', + project: 'Lock.js SDK' + }, + + mochaReporter: { + output: 'minimal' + }, + + // define browsers + customLaunchers: { + bs_chrome_windows: { + base: 'BrowserStack', + browser: 'chrome', + browser_version: 'latest', + os: 'Windows', + os_version: '10', + displayName: 'Chrome on Windows 10' + }, + bs_edge_windows: { + base: 'BrowserStack', + browser: 'edge', + browser_version: 'latest', + os: 'Windows', + os_version: '10', + displayName: 'Chrome on Windows 10' + }, + bs_firefox_windows: { + base: 'BrowserStack', + browser: 'firefox', + browser_version: 'latest', + os: 'Windows', + os_version: '10', + displayName: 'Firefox on Windows 10' + }, + bs_safari: { + base: 'BrowserStack', + browser: 'safari', + browser_version: 'latest', + os: 'OS X', + os_version: 'Big Sur', + displayName: 'Latest Safari on Big Sur' + }, + bs_ie11_windows: { + base: 'BrowserStack', + browser: 'IE', + browser_version: 'latest', + os: 'Windows', + os_version: '10', + displayName: 'IE11 on Windows 10' + }, + chrome_headless: { + base: 'Chrome', + flags: ['--headless'] + } + }, + + browsers: ['bs_chrome_windows'] + }); +}; diff --git a/opslevel.yml b/opslevel.yml new file mode 100644 index 000000000..009a5ec0b --- /dev/null +++ b/opslevel.yml @@ -0,0 +1,6 @@ +--- +version: 1 +repository: + owner: dx_sdks + tier: + tags: diff --git a/package.json b/package.json index ef948e4f6..0d75dd843 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "auth0-lock", - "version": "11.28.0", + "version": "12.0.2", "description": "Auth0 Lock", "author": "Auth0 (http://auth0.com)", "license": "MIT", + "homepage": "https://github.com/auth0/lock", "keywords": [ "auth0", "auth", @@ -25,98 +26,121 @@ "dev": "grunt dev", "dist": "grunt dist", "prepublish": "cross-env BABEL_ENV=npm grunt dist", - "precommit": "lint-staged", + "precommit": "yarn lint-staged", "lint": "eslint --ext .jsx,.js src/", - "test": "cross-env BABEL_ENV=test zuul -- test/**/*.test.js", - "test:browser": "cross-env BABEL_ENV=test zuul --local 8080 --disable-tunnel -- test/**/*.test.js", - "test:cli": "cross-env BABEL_ENV=test mochify --extension=.jsx --transform=babelify ./test/setup.js test/**/*.test.js", - "test:watch": "cross-env BABEL_ENV=test mochify --watch --extension=.jsx --transform=babelify ./test/setup.js test/**/*.test.js", - "test:jest": "jest --coverage --runInBand", - "test:jest:watch": "jest --watch --coverage", + "test:e2e": "cross-env BABEL_ENV=test karma start --browsers ChromeHeadless", + "test:e2e:watch": "cross-env BABEL_ENV=test karma start --browsers Chrome --single-run=false", + "test:e2e:browserstack": "cross-env BABEL_ENV=test karma start", + "test": "jest --coverage --runInBand", + "test:watch": "jest --watch --coverage", "test:es-check": "es-check es5 'build/*.js'", "publish:cdn": "ccu --trace", - "release": "scripts/release.sh", "i18n:translate": "grunt dist && node scripts/complete-translations.js && npm run i18n:prettier && npm run build", - "i18n:prettier": "prettier --write --print-width 100 --single-quote src/i18n/*", + "i18n:prettier": "prettier --write src/i18n/*", "i18n:validate": "node -r esm scripts/lang-audit.js" }, "devDependencies": { "@auth0/component-cdn-uploader": "^2.2.2", + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-do-expressions": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-function-bind": "^7.0.0", + "@babel/plugin-proposal-function-sent": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-proposal-pipeline-operator": "^7.0.0", + "@babel/plugin-proposal-throw-expressions": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/preset-react": "^7.0.0", + "@cfaester/enzyme-adapter-react-18": "^0.7.0", "@google-cloud/translate": "^6.0.2", - "babel-core": "^6.17.0", - "babel-eslint": "^7.2.2", - "babel-loader": "^6.2.5", + "babel-eslint": "^9.0.0", + "babel-jest": "^29.3.1", + "babel-loader": "8.3.0", "babel-plugin-stylus-compiler": "^1.4.0", "babel-plugin-transform-css-import-to-string": "0.0.2", "babel-plugin-version-inline": "^1.0.0", - "babel-preset-es2015": "^6.22.0", - "babel-preset-react": "^6.24.1", - "babel-preset-stage-0": "^6.3.13", - "babelify": "^7.2.0", + "babelify": "^10.0.0", + "browserify": "^17.0.0", "bump-version": "^0.5.0", - "chalk": "^3.0.0", - "cross-env": "^3.1.4", - "css-loader": "^0.26.1", - "dotenv": "^8.0.0", - "emojic": "^1.1.15", - "enzyme": "^3.1.0", - "enzyme-adapter-react-15": "^1.0.1", - "es-check": "^4.0.0", - "eslint": "^4.8.0", - "eslint-config-prettier": "^2.6.0", + "chalk": "^4.1.2", + "core-js": "^3.26.1", + "cross-env": "^7.0.3", + "css-loader": "^0.28.11", + "emojic": "^1.1.17", + "enzyme": "^3.1.1", + "es-check": "^6.0.0", + "eslint": "^7.32.0", + "eslint-config-prettier": "^8.3.0", "eslint-plugin-react": "^7.4.0", "esm": "^3.2.25", + "events": "^3.3.0", "expect.js": "^0.3.1", - "flat": "^2.0.1", - "glob": "^7.1.6", - "grunt": "^0.4.5", - "grunt-babel": "^6.0.0", + "flat": "^5.0.2", + "glob": "^7.1.7", + "grunt": "^1.3.0", + "grunt-babel": "^8.0.0", "grunt-cli": "^0.1.13", "grunt-concurrent": "^2.3.1", - "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-clean": "^0.7.0", "grunt-env": "^0.4.4", "grunt-exec": "^0.4.6", - "grunt-webpack": "^2.0.1", - "husky": "^0.14.3", - "jest": "^21.2.1", + "grunt-webpack": "^5.0.0", + "husky": "^7.0.2", + "jest": "^29.3.1", + "jest-environment-jsdom": "^29.3.1", + "jest-environment-jsdom-global": "^4.0.0", "json-beautify": "^1.0.1", - "jsonwebtoken": "^7.3.0", - "lint-staged": "^4.2.3", - "mochify": "^6.3.0", + "karma": "^6.4.1", + "karma-babel-preprocessor": "^8.0.2", + "karma-browserify": "^8.1.0", + "karma-browserstack-launcher": "^1.6.0", + "karma-chrome-launcher": "^3.1.1", + "karma-mocha": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "lint-staged": "^11.1.4", + "mocha": "^9.1.4", "node-es-module-loader": "^0.3.8", - "prettier": "^1.7.4", - "react-test-renderer": "^15.6.2", - "semver": "^6.2.0", + "prettier": "^2.4.1", + "puppeteer": "^10.1.0", + "react-test-renderer": "^18.2.0", "sinon": "^1.15.4", - "stylus": "^0.54.5", + "stylus": "^0.59.0", "stylus-loader": "^2.3.1", - "superagent": "^5.2.2", - "tmp": "^0.1.0", + "tmp": "^0.2.1", "uglify-js": "^2.7.4", - "unminified-webpack-plugin": "^1.1.1", + "unminified-webpack-plugin": "^3.0.0", "unreleased": "^0.1.0", - "watchify": "^3.7.0", - "webpack": "^2.2.1", - "webpack-core": "^0.6.8", - "webpack-dev-server": "^2.3.0", - "zuul": "^3.12.0", - "zuul-ngrok": "4.0.0" + "watchify": "^4.0.0", + "webpack": "^5.75.0", + "webpack-cli": "^5.0.0", + "webpack-dev-server": "^4.11.1" }, "dependencies": { - "auth0-js": "^9.13.3", + "auth0-js": "^9.20.0", "auth0-password-policies": "^1.0.2", - "blueimp-md5": "2.3.1", - "immutable": "^3.7.3", + "blueimp-md5": "^2.19.0", + "classnames": "^2.3.2", + "dompurify": "^2.3.12", + "immutable": "^3.7.6", "jsonp": "^0.2.1", - "password-sheriff": "^1.1.0", - "prop-types": "^15.6.0", - "qs": "^6.7.0", - "react": "^15.6.2", - "react-dom": "^15.6.2", + "password-sheriff": "^1.1.1", + "prop-types": "^15.8.0", + "qs": "^6.10.3", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-transition-group": "^2.2.1", - "trim": "1.0.0", + "trim": "^1.0.1", "url-join": "^1.1.0", - "validator": "^13.1.1" + "validator": "^13.6.0" }, "ccu": { "name": "lock", @@ -158,15 +182,15 @@ "coverageReporters": [ "lcov", "text-summary" - ] + ], + "testEnvironment": "jest-environment-jsdom-global" }, "lint-staged": { "*.{js,jsx}": [ "npm run lint" ], "*.{js,jsx,json}": [ - "prettier --write --print-width 100 --single-quote", - "git add" + "prettier --write" ] } } diff --git a/scripts/ci.sh b/scripts/ci.sh deleted file mode 100755 index b2a9d7e33..000000000 --- a/scripts/ci.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash - -yarn install - -MATCHER=${2:-"*"} -NPM_TAG=${3:-"beta"} - -NPM_NAME=$(node scripts/utils/attribute.js name) -VERSION=$(node scripts/utils/attribute.js version) - -NPM_BIN=$(npm bin) -STABLE=$($NPM_BIN/semver $VERSION -r "*") - -# Enable failing on exit status here because semver exits with 1 when the range -# doesn't match. -set -e - -new_line() -{ - echo "" -} - -verbose() -{ - echo -e " \033[36m→\033[0m $1" -} - -verbose_item() -{ - echo -e " \033[96m∙\033[0m $1" -} - -success() -{ - echo -e " \033[1;32m✔︎\033[0m $1" -} - -cdn_release() -{ - npm run publish:cdn - new_line - success "$NPM_NAME ($1) uploaded to cdn" -} - -bower_release() -{ - # Check if tag exists - TAG_NAME="v$VERSION" - TAG_EXISTS=$(git tag -l "$TAG_NAME") - - if [ ! -z "$TAG_EXISTS" ]; then - verbose "There is already a tag $TAG_EXISTS in git. Skipping git deploy." - else - verbose "Deploying $VERSION to git" - - LAST_COMMIT=$(git log -1 --pretty=%B) - grep -v -e '^build$' -e '^build/$' .gitignore > /tmp/.gitignore - mv /tmp/.gitignore .gitignore - git add --force build/* - git commit -am "$TAG_NAME" - git tag "$TAG_NAME" -m "$LAST_COMMIT" - git push origin $TAG_NAME - success "$NPM_NAME version ready for bower" - fi -} - -npm_release() -{ - verbose "Checking if version $1 of $NPM_NAME is already available in npm…" - - NPM_EXISTS=$(npm info -s $NPM_NAME@$1 version) - - if [ ! -z "$NPM_EXISTS" ] && [ "$NPM_EXISTS" == "$1" ]; then - verbose "There is already a version $NPM_EXISTS in npm. Skipping npm publish…" - else - if [ ! -z "$STABLE" ]; then - verbose "Deploying $1 to npm" - npm publish - else - verbose "Deploying $1 to npm with tag $NPM_TAG" - npm publish --tag "$NPM_TAG" - fi - success "$NPM_NAME uploaded to npm registry" - fi -} - - -# Test -if [ -n "$SAUCE_USERNAME" ] -then - yarn run test -else - yarn run test:cli - yarn run test:jest -fi - -# Clean -rm -f build/*.js - -# Build & Release Webpack Bundle -yarn run dist build -git checkout -b dist -bower_release -new_line -cdn_release "$VERSION" -new_line - -# Build & Release NPM -yarn run prepublish -npm_release "$VERSION" - -git checkout master -git branch -D dist \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh deleted file mode 100755 index 0474b41df..000000000 --- a/scripts/release.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash - -# Usage: -# It receives only one parameter with is the version level (major, minor or patch) -# -# Running the script directly: -# scripts/release.sh minor -# -# Running the npm script -# npm run release -- major -# -# or the tag it should use the final version number starting with `v` -# -# Running the script directly: -# scripts/release.sh v8.0.0-beta.1 -# -# Running the npm script -# npm run release -- v8.0.0-beta.1 - -NEW_VERSION="" -VALID_VERSION_LEVELS=(major minor patch) -CURR_DATE=`date +%Y-%m-%d` - -IS_VALID_VERSION_LEVEL=false -VERSION_LEVEL=$1 - -REPO_URL=$( jq .repository.url package.json | sed 's/\"//g' | sed 's/\.git//g') -REPO_NAME=$( basename $REPO_URL ) -TMP_CHANGELOG_FILE="/tmp/$REPO_NAME-TMPCHANGELOG-$RANDOM" - -if [ "$REPO_NAME" = "null" ] || [ "$REPO_NAME" = "" ]; then - echo "Could not parse repository url" - exit 1 -fi - -if [ "$VERSION_LEVEL" = "" ]; then - echo "Version level not provided" - exit 1 -fi - -for i in "${!VALID_VERSION_LEVELS[@]}"; do - if [[ "${VALID_VERSION_LEVELS[$i]}" = "${VERSION_LEVEL}" ]]; then - IS_VALID_VERSION_LEVEL=true - fi -done - -if [ $IS_VALID_VERSION_LEVEL = false ]; then - FIRST_LETER=${VERSION_LEVEL:0:1} - - if [ "$FIRST_LETER" != "v" ]; then - echo "Version level is not valid (major, minor, patch or the version tag (v#.#.#) supported)" - exit 1 - fi - - NEW_V_VERSION=$VERSION_LEVEL - NEW_VERSION=${VERSION_LEVEL:1} -fi - -echo "Release process init" - -ORIG_VERSION=$(jq .version package.json | sed 's/\"//g') -ORIG_V_VERSION="v$ORIG_VERSION" - -echo "Current version" $ORIG_VERSION - -if [ "$NEW_VERSION" == "" ]; then - NEW_VERSION=$( node_modules/.bin/semver $ORIG_VERSION -i $VERSION_LEVEL ) - NEW_V_VERSION="v$NEW_VERSION" -fi - -QUOTED_NEW_VERSION="\"$NEW_VERSION\"" - -echo "New version" $NEW_VERSION - -read -p "Do you want to continue? (y/n)" choice -case "$choice" in - y|Y ) echo "Releasing" $NEW_VERSION;; - * ) exit 0;; -esac - -git checkout master -git pull -git checkout -b prepare-$NEW_V_VERSION - -echo "Updating package.json" -jq ".version=$QUOTED_NEW_VERSION" package.json > package.json.new -jq ".version=$QUOTED_NEW_VERSION" bower.json > bower.json.new - -echo "Generating tmp changelog" -echo "# Change Log" > $TMP_CHANGELOG_FILE -echo "" >> $TMP_CHANGELOG_FILE -echo "## [$NEW_V_VERSION](https://github.com/auth0/$REPO_NAME/tree/$NEW_V_VERSION) ($CURR_DATE)" >> $TMP_CHANGELOG_FILE -echo "[Full Changelog](https://github.com/auth0/$REPO_NAME/compare/$ORIG_V_VERSION...$NEW_V_VERSION)" >> $TMP_CHANGELOG_FILE -echo "" >> $TMP_CHANGELOG_FILE - -CHANGELOG_WEBTASK="https://webtask.it.auth0.com/api/run/wt-hernan-auth0_com-0/oss-changelog.js?webtask_no_cache=1&repo=$REPO_NAME&milestone=$NEW_V_VERSION" - -curl -f -s -H "Accept: text/markdown" $CHANGELOG_WEBTASK >> $TMP_CHANGELOG_FILE - -echo "Updating README.md" -sed -i .old "s/lock\/$ORIG_VERSION\/lock.min.js/lock\/$NEW_VERSION\/lock.min.js/g" README.md - -echo "Updating CHANGELOG.md" - -sed "s/\# Change Log//" CHANGELOG.md >> $TMP_CHANGELOG_FILE - -echo "Replacing files" - -mv package.json.new package.json -mv bower.json.new bower.json -mv $TMP_CHANGELOG_FILE CHANGELOG.md -rm README.md.old - -git commit -am "Release $NEW_V_VERSION" -git push origin HEAD - diff --git a/src/__tests__/__snapshots__/auth_button.test.jsx.snap b/src/__tests__/__snapshots__/auth_button.test.jsx.snap index 078f342c3..0682627e2 100644 --- a/src/__tests__/__snapshots__/auth_button.test.jsx.snap +++ b/src/__tests__/__snapshots__/auth_button.test.jsx.snap @@ -4,17 +4,17 @@ exports[`AuthButton renders correctly 1`] = `
label
@@ -25,9 +25,9 @@ exports[`AuthButton renders with style customizations 1`] = `
+ +
+`; + +exports[`LoginPane renders a captcha 1`] = ` +
+ +
+`; + +exports[`LoginPane renders correctly 1`] = ` +
+ +
+`; + +exports[`LoginPane shows the captcha for SSO (ADFS) connections 1`] = ` +
+ +
+`; diff --git a/src/__tests__/connection/database/__snapshots__/password_reset_confirmation.test.jsx.snap b/src/__tests__/connection/database/__snapshots__/password_reset_confirmation.test.jsx.snap index 40554495e..5dab121d8 100644 --- a/src/__tests__/connection/database/__snapshots__/password_reset_confirmation.test.jsx.snap +++ b/src/__tests__/connection/database/__snapshots__/password_reset_confirmation.test.jsx.snap @@ -7,13 +7,34 @@ exports[`PasswordResetConfirmation renders correctly 1`] = `
- ", - } - } - /> + + + + + + + + +

diff --git a/src/__tests__/connection/database/__snapshots__/reset_password.test.jsx.snap b/src/__tests__/connection/database/__snapshots__/reset_password.test.jsx.snap index 08cf5d063..ac047fada 100644 --- a/src/__tests__/connection/database/__snapshots__/reset_password.test.jsx.snap +++ b/src/__tests__/connection/database/__snapshots__/reset_password.test.jsx.snap @@ -1,7 +1,105 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`ResetPasswordScreen a custom connection resolver is being used copies the username to the email field if an email address was entered 1`] = ` +
+`; + +exports[`ResetPasswordScreen a custom connection resolver is being used sets the email field to a blank value if username is not an email address 1`] = ` +
+`; + exports[`ResetPasswordScreen isSubmitDisabled returns false when \`isEnterpriseDomain\` is false 1`] = ` -Array [ +[ "updateEntity", "lock", "id", @@ -10,7 +108,7 @@ Array [ `; exports[`ResetPasswordScreen isSubmitDisabled returns true when \`isEnterpriseDomain\` is true 1`] = ` -Array [ +[ "updateEntity", "lock", "id", diff --git a/src/__tests__/connection/database/__snapshots__/signed_up_confirmation.test.jsx.snap b/src/__tests__/connection/database/__snapshots__/signed_up_confirmation.test.jsx.snap index c918cf421..d69239700 100644 --- a/src/__tests__/connection/database/__snapshots__/signed_up_confirmation.test.jsx.snap +++ b/src/__tests__/connection/database/__snapshots__/signed_up_confirmation.test.jsx.snap @@ -7,13 +7,34 @@ exports[`SignedUpConfirmation renders correctly 1`] = `
- ", - } - } - /> + + + + + + + + +

diff --git a/src/__tests__/connection/database/actions.test.js b/src/__tests__/connection/database/actions.test.js index 48e0763f1..03d6513f1 100644 --- a/src/__tests__/connection/database/actions.test.js +++ b/src/__tests__/connection/database/actions.test.js @@ -13,10 +13,17 @@ jest.mock('core/web_api', () => ({ })); describe('database/actions.js', () => { + beforeEach(() => { + jest.resetAllMocks(); + }); + it('signUp splits root attributes correctly', () => { const id = 1; + const hookRunner = jest.fn((str, m, context, fn) => fn()); + require('connection/database/index').databaseConnectionName = () => 'test-connection'; require('connection/database/index').shouldAutoLogin = () => true; + const m = Immutable.fromJS({ field: { email: { @@ -53,17 +60,24 @@ describe('database/actions.js', () => { { name: 'picture', storage: 'root' }, { name: 'other_prop' } ] + }, + core: { + hookRunner } }); swap(setEntity, 'lock', id, m); signUp(id); - const { validateAndSubmit: { mock: validateAndSubmitMock } } = coreActionsMock(); + const { + validateAndSubmit: { mock: validateAndSubmitMock } + } = coreActionsMock(); expect(validateAndSubmitMock.calls.length).toBe(1); expect(validateAndSubmitMock.calls[0][0]).toBe(id); expect(validateAndSubmitMock.calls[0][1]).toContain('email'); expect(validateAndSubmitMock.calls[0][1]).toContain('password'); validateAndSubmitMock.calls[0][2](m); - const { signUp: { mock: signUpMock } } = webApiMock(); + const { + signUp: { mock: signUpMock } + } = webApiMock(); expect(signUpMock.calls.length).toBe(1); expect(signUpMock.calls[0][0]).toBe(id); expect(signUpMock.calls[0][1]).toMatchObject({ @@ -81,4 +95,117 @@ describe('database/actions.js', () => { } }); }); + + it('runs the signingUp hook on signUp', () => { + const id = 1; + + require('connection/database/index').databaseConnectionName = () => 'test-connection'; + require('connection/database/index').shouldAutoLogin = () => true; + + const hookRunner = jest.fn((str, m, context, fn) => fn()); + + const m = Immutable.fromJS({ + field: { + email: { + value: 'test@email.com' + }, + password: { + value: 'testpass' + } + }, + core: { + hookRunner + } + }); + + swap(setEntity, 'lock', id, m); + + signUp(id); + + const { + validateAndSubmit: { mock: validateAndSubmitMock } + } = coreActionsMock(); + + validateAndSubmitMock.calls[0][2](m); + + const { + signUp: { mock: signUpMock } + } = webApiMock(); + + expect(hookRunner).toHaveBeenCalledTimes(1); + expect(hookRunner).toHaveBeenCalledWith('signingUp', m, null, expect.any(Function)); + expect(signUpMock.calls.length).toBe(1); + expect(signUpMock.calls[0][0]).toBe(id); + }); + + it('sanitizes additionalSignUp fields using dompurify', () => { + const id = 1; + const hookRunner = jest.fn((str, m, context, fn) => fn()); + + require('connection/database/index').databaseConnectionName = () => 'test-connection'; + require('connection/database/index').shouldAutoLogin = () => true; + + // Test different fields using some examples from DOMPurify + // https://github.com/cure53/DOMPurify#some-purification-samples-please + const m = Immutable.fromJS({ + field: { + email: { + value: 'test@email.com' + }, + password: { + value: 'testpass' + }, + family_name: { + value: 'Test
Fake link' // HTML but not malicious + }, + given_name: { + value: '' + }, + name: { + value: '

abc