{"id":13515319,"url":"https://github.com/auth0/lock","last_synced_at":"2026-04-01T18:39:26.711Z","repository":{"id":19635835,"uuid":"22887863","full_name":"auth0/lock","owner":"auth0","description":"Auth0's signin solution","archived":false,"fork":false,"pushed_at":"2025-03-29T00:03:21.000Z","size":164714,"stargazers_count":1130,"open_issues_count":15,"forks_count":553,"subscribers_count":93,"default_branch":"master","last_synced_at":"2025-04-01T22:17:09.267Z","etag":null,"topics":["dx-sdk","lock"],"latest_commit_sha":null,"homepage":"https://auth0.com/docs/libraries/lock","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/auth0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":"support/callback-cross-auth.html","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-12T18:28:41.000Z","updated_at":"2025-03-18T21:49:02.000Z","dependencies_parsed_at":"2023-10-16T19:42:35.827Z","dependency_job_id":"e625fb70-c04f-4066-a133-3319d7e389f6","html_url":"https://github.com/auth0/lock","commit_stats":{"total_commits":3162,"total_committers":239,"mean_commits":"13.230125523012552","dds":0.5003162555344718,"last_synced_commit":"1cf70cc5e3f1617a4e2f99791bf57ba6524dd4b5"},"previous_names":[],"tags_count":546,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Flock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Flock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Flock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auth0%2Flock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auth0","download_url":"https://codeload.github.com/auth0/lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247941702,"owners_count":21022038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dx-sdk","lock"],"created_at":"2024-08-01T05:01:09.382Z","updated_at":"2026-04-01T18:39:26.706Z","avatar_url":"https://github.com/auth0.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"![Auth0's configurable login form for web applications](https://cdn.auth0.com/website/sdks/banners/lock-banner.png)\n![Release](https://img.shields.io/npm/v/auth0-lock)\n![Downloads](https://img.shields.io/npm/dw/auth0-lock)\n[![License](https://img.shields.io/:license-mit-blue.svg?style=flat)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/auth0/lock/actions/workflows/test.yml/badge.svg)](https://github.com/auth0/lock/actions/workflows/test.yml)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/auth0/lock)\n\n\u003e :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=\u0026labels=bug+report,v12\u0026template=report_a_bug.md\u0026title=).\n\n\u003e :warning: From v12 onwards, we no longer publish to Bower.\n\n## Documentation\n\n- [Docs Site](https://auth0.com/docs) - explore our Docs site and learn more about Auth0.\n\n## Getting Started\n\n### Browser Compatibility\n\nWe ensure browser compatibility in Chrome, Safari, Firefox.\n\n### Installation\n\nInstall Lock into your project using [npm](https://npmjs.org):\n\n```sh\nnpm install auth0-lock\n```\n\nFrom CDN\n\n```html\n\u003c!-- Latest patch release (recommended for production) --\u003e\n\u003cscript src=\"https://cdn.auth0.com/js/lock/14.2.5/lock.min.js\"\u003e\u003c/script\u003e\n```\n\n### Configure Auth0\n\nCreate a **Single Page Application** in the [Auth0 Dashboard](https://manage.auth0.com/#/applications).\n\n\u003e **If you're using an existing application**, verify that you have configured the following settings in your Single Page Application:\n\u003e\n\u003e - Click on the \"Settings\" tab of your application's page.\n\u003e - Scroll down and click on the \"Show Advanced Settings\" link.\n\u003e - Under \"Advanced Settings\", click on the \"OAuth\" tab.\n\u003e - Ensure that \"JsonWebToken Signature Algorithm\" is set to `RS256` and that \"OIDC Conformant\" is enabled.\n\u003e   Next, configure the following URLs for your application under the \"Application URIs\" section of the \"Settings\" page:\n\n- **Allowed Callback URLs**: `http://localhost:3000`\n- **Allowed Logout URLs**: `http://localhost:3000`\n- **Allowed Web Origins**: `http://localhost:3000`\n\n\u003e 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).\n\u003e Take note of the **Client ID** and **Domain** values under the \"Basic Information\" section. You'll need these values in the next step.\n\n### Configure the SDK\n\nCreate either an `Auth0Lock` or `Auth0LockPasswordless` instance, depending on your use case:\n\n#### Auth0Lock\n\n```js\nimport { Auth0Lock } from 'auth0-lock';\n\nconst lock = new Auth0Lock('{YOUR_AUTH0_CLIENT_ID}', '{YOUR_AUTH0_DOMAIN}');\n```\n\n#### Auth0LockPasswordless\n\n```js\nimport { Auth0LockPasswordless } from 'auth0-lock';\n\nconst lock = new Auth0LockPasswordless('{YOUR_AUTH0_CLIENT_ID}', '{YOUR_AUTH0_DOMAIN}');\n```\n\n### Logging In\n\nConfigure a listener for the `authenticated` event to retrieve an access token and call `show` to display the Lock widget.\n\n```html\n\u003cbutton id=\"login\"\u003eClick to Login\u003c/button\u003e\n```\n\n```js\nlock.on('authenticated', function (authResult) {\n  lock.getUserInfo(authResult.accessToken, function (error, profileResult) {\n    if (error) {\n      // Handle error\n      return;\n    }\n\n    accessToken = authResult.accessToken;\n    profile = profileResult;\n\n    // Update DOM\n  });\n});\n\n// Show the widget when the login button is clicked\ndocument.getElementById('login').addEventListener('click', () =\u003e {\n  lock.show()\n});.\n```\n\nFor other comprehensive examples and documentation on the configuration options, see the [EXAMPLES.md](https://github.com/auth0/lock/blob/master/EXAMPLES.md) document.\n\n## Feedback\n\n### Contributing\n\nWe appreciate feedback and contribution to this repo! Before you get started, please see the following:\n\n- [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)\n- [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)\n- [This repo's contribution guide](https://github.com/auth0/lock/blob/master/DEVELOPMENT.md)\n\n### Raise an issue\n\n:warning: Note: We are no longer supporting requests for new features. Only requests for bug fixes or security patches will be considered.\n\nTo provide feedback or report a bug, please [raise an issue on our issue tracker](https://github.com/auth0/lock/issues).\n\n### Vulnerability Reporting\n\nPlease 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.\n\n## What is Auth0?\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://cdn.auth0.com/website/sdks/logos/auth0_dark_mode.png\" width=\"150\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png\" width=\"150\"\u003e\n    \u003cimg alt=\"Auth0 Logo\" src=\"https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png\" width=\"150\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout \u003ca href=\"https://auth0.com/why-auth0\"\u003eWhy Auth0?\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  This project is licensed under the MIT license. See the \u003ca href=\"https://github.com/auth0/lock/blob/master/LICENSE\"\u003e LICENSE\u003c/a\u003e file for more info.\n\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Flock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauth0%2Flock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0%2Flock/lists"}