{"id":28446939,"url":"https://github.com/os-js/osjs-auth0-auth","last_synced_at":"2025-06-30T06:32:42.374Z","repository":{"id":57134341,"uuid":"167626944","full_name":"os-js/osjs-auth0-auth","owner":"os-js","description":"OS.js Auth0 Authentication Adapter","archived":false,"fork":false,"pushed_at":"2020-02-24T18:56:06.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T11:08:48.322Z","etag":null,"topics":["osjs","osjs-adapter"],"latest_commit_sha":null,"homepage":"","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/os-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"andersevenrud","patreon":"andersevenrud","open_collective":"osjs","liberapay":"os-js","custom":"https://paypal.me/andersevenrud"}},"created_at":"2019-01-25T23:20:09.000Z","updated_at":"2020-10-23T01:12:27.000Z","dependencies_parsed_at":"2022-09-04T09:11:28.416Z","dependency_job_id":null,"html_url":"https://github.com/os-js/osjs-auth0-auth","commit_stats":null,"previous_names":["andersevenrud/osjs-auth0-auth"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/os-js/osjs-auth0-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-auth0-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-auth0-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-auth0-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-auth0-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/os-js","download_url":"https://codeload.github.com/os-js/osjs-auth0-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-auth0-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260979379,"owners_count":23091979,"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":["osjs","osjs-adapter"],"created_at":"2025-06-06T11:08:52.259Z","updated_at":"2025-06-30T06:32:42.366Z","avatar_url":"https://github.com/os-js.png","language":"JavaScript","funding_links":["https://github.com/sponsors/andersevenrud","https://patreon.com/andersevenrud","https://opencollective.com/osjs","https://liberapay.com/os-js","https://paypal.me/andersevenrud","https://www.patreon.com/user?u=2978551\u0026ty=h\u0026u=2978551","https://liberapay.com/os-js/"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"OS.js Logo\" src=\"https://raw.githubusercontent.com/os-js/gfx/master/logo-big.png\" /\u003e\n\u003c/p\u003e\n\n[OS.js](https://www.os-js.org/) is an [open-source](https://raw.githubusercontent.com/os-js/OS.js/master/LICENSE) web desktop platform with a window manager, application APIs, GUI toolkit, filesystem abstractions and much more.\n\n[![Support](https://img.shields.io/badge/patreon-support-orange.svg)](https://www.patreon.com/user?u=2978551\u0026ty=h\u0026u=2978551)\n[![Support](https://img.shields.io/badge/opencollective-donate-red.svg)](https://opencollective.com/osjs)\n[![Donate](https://img.shields.io/badge/liberapay-donate-yellowgreen.svg)](https://liberapay.com/os-js/)\n[![Donate](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://paypal.me/andersevenrud)\n[![Community](https://img.shields.io/badge/join-community-green.svg)](https://community.os-js.org/)\n\n# OS.js Auth0 Auth Provider Adapter\n\nThis is the Auth0 Auth Provider Adapter for OS.js.\n\n**THIS IS A WORK IN PROGRESS**\n\nPlease see the [OS.js Authentication Guide](https://manual.os-js.org/v3/guide/auth/) for general information.\n\n## Introduction\n\nThis adapter makes it possible to authenticate/authorize logins via Auth0.\n\nThe client will use the Auth0 \"Lock\" (login) and send the user profile to the server.\n\nThe server will inject middleware to protect the APIs.\n\nThis is the setup procedure:\n\n1. Create your application on Auth0\n2. Create your API on Auth0\n3. Install this library\n4. Set up the server\n5. Set up the client\n\n## Installation\n\n```\nnpm install --save --production @osjs/auth0-auth\n```\n\n## Usage\n\n### Configure Server\n\nIn your server configuration file (`src/server/config.js`):\n\n```javascript\nmodule.exports = {\n  // Add the following section\n  auth0: {\n    jwksUri: 'https://YOUR_AUTH0_DOMAIN/.well-known/jwks.json',\n    audience: 'https://YOUR_AUDIENCE/',\n    issuer: 'https://YOUR_AUTH0_DOMAIN/',\n  }\n};\n```\n\nIn your server bootstrap script (`src/server/index.js`):\n\n```javascript\n// In the top of the file load the library\nconst auth0auth = require('@osjs/auth0-auth/server.js');\n\n// Locate this line in the file and add the following:\nosjs.register(AuthServiceProvider, {\n  args: {\n    adapter: auth0auth\n  }\n});\n```\n\n*A restart of the server is required*\n\n### Configure Client\n\nAdd the following script to your `src/client/index.ejs` file:\n\n```\n\u003cscript src=\"https://cdn.auth0.com/js/auth0/9.5.1/auth0.min.js\"\u003e\u003c/script\u003e\n```\n\nIn your client configuration file (`src/client/config.js`) file remove the automatic login:\n\n```javascript\nmodule.exports = {\n  // Either comment out this section, or remove it entirely\n  /*\n  auth: {\n    login: {\n      username: 'demo',\n      password: 'demo'\n    }\n  }\n  */\n\n  // Add the following section\n  auth0: {\n    domain: 'YOUR_AUTH0_DOMAIN',\n    clientID: 'YOUR_CLIENT_ID',\n    audience: 'https://YOUR_AUDIENCE/'\n  }\n};\n```\n\nIn your client bootstrap script (`src/client/index.js`):\n\n```javascript\n// In the top of the file load the library\nimport {Login} from '@osjs/auth0-auth';\n\n// Locate this line in the file and add the following:\nosjs.register(AuthServiceProvider, {\n  before: true,\n  args: {\n    login: (core, options) =\u003e new Login(core, options)\n  }\n});\n```\n\n*Rebuilding the client is required*\n\n## Contribution\n\n* **Sponsor on [Github](https://github.com/sponsors/andersevenrud)**\n* **Become a [Patreon](https://www.patreon.com/user?u=2978551\u0026ty=h\u0026u=2978551)**\n* **Support on [Open Collective](https://opencollective.com/osjs)**\n* [Contribution Guide](https://github.com/os-js/OS.js/blob/master/CONTRIBUTING.md)\n\n## Documentation\n\nSee the [Official Manuals](https://manual.os-js.org/v3/) for articles, tutorials and guides.\n\n## Links\n\n* [Official Chat](https://gitter.im/os-js/OS.js)\n* [Community Forums and Announcements](https://community.os-js.org/)\n* [Homepage](https://os-js.org/)\n* [Twitter](https://twitter.com/osjsorg) ([author](https://twitter.com/andersevenrud))\n* [Google+](https://plus.google.com/b/113399210633478618934/113399210633478618934)\n* [Facebook](https://www.facebook.com/os.js.org)\n* [Docker Hub](https://hub.docker.com/u/osjs/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fos-js%2Fosjs-auth0-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fos-js%2Fosjs-auth0-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fos-js%2Fosjs-auth0-auth/lists"}