{"_id":"@667/auth0-vue","name":"@667/auth0-vue","dist-tags":{"latest":"2.0.1-667"},"versions":{"2.0.1-667":{"author":{"name":"Auth0"},"name":"@667/auth0-vue","description":"Auth0 SDK for Vue Applications using Authorization Code Grant Flow with PKCE","license":"MIT","version":"2.0.1-667","main":"dist/lib/auth0-vue.cjs.js","types":"dist/typings/index.d.ts","module":"dist/auth0-vue.production.esm.js","exports":{".":{"require":"./dist/lib/auth0-vue.cjs.js","import":"./dist/auth0-vue.production.esm.js","types":"./dist/typings/index.d.ts"}},"scripts":{"dev":"rimraf dist && rollup -c --watch","start":"npm run dev","docs":"typedoc --options ./typedoc.js src","build":"rimraf dist && rollup -m -c --environment NODE_ENV:production && npm run test:es-check","build:stats":"npm run build -- --environment WITH_STATS:true && open stats.html","lint:security":"eslint ./src --ext ts --no-eslintrc --config ./.eslintrc.security","test":"jest --coverage --silent","test:watch":"jest --coverage --watch","test:debug":"node --inspect node_modules/.bin/jest --runInBand","test:open:integration":"cypress open","test:watch:integration":"concurrently --raw npm:dev 'npm:test:open:integration'","test:es-check":"npm run test:es-check:es2017 && npm run test:es-check:es2017:module","test:es-check:es2017":"es-check es2017 dist/auth0-vue.production.js","test:es-check:es2017:module":"es-check es2017 dist/auth0-vue.production.esm.js --module ","test:integration:server":"npm run dev","test:integration:tests":"wait-on http://localhost:3000/ && cypress run","test:integration":"concurrently --raw --kill-others --success first npm:test:integration:server npm:test:integration:tests","serve:coverage":"serve coverage/lcov-report -n","serve:stats":"serve bundle-stats -n","print-bundle-size":"node ./scripts/print-bundle-size","prepack":"npm run build","publish:cdn":"ccu --trace"},"devDependencies":{"@auth0/component-cdn-uploader":"github:auth0/component-cdn-uploader#v2.2.2","@jest/globals":"^29.3.1","@rollup/plugin-replace":"^3.0.0","@typescript-eslint/parser":"^5.8.0","browserstack-cypress-cli":"^1.19.0","cli-table":"^0.3.11","concurrently":"^7.5.0","cypress":"^9.2.0","es-check":"^7.0.1","eslint":"^8.5.0","eslint-plugin-security":"^1.5.0","gzip-size":"^6.0.0","husky":"^7.0.4","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","jest-junit":"^14.0.1","oidc-provider":"^7.10.5","prettier":"^2.5.1","pretty-quick":"^3.1.3","qss":"^2.0.3","rimraf":"^3.0.2","rollup":"^2.61.1","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-dev":"^1.1.3","rollup-plugin-livereload":"^2.0.5","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-sourcemaps":"^0.6.3","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript2":"^0.31.1","rollup-plugin-visualizer":"^5.5.2","rollup-plugin-vue":"^6.0.0","rollup-plugin-web-worker-loader":"^1.6.1","serve":"^14.1.1","ts-jest":"^29.0.3","tslib":"^2.3.1","typedoc":"^0.23.21","typescript":"^4.9.3","vue-router":"^4.0.12","wait-on":"^6.0.0"},"dependencies":{"@auth0/auth0-spa-js":"^2.0.1","vue":"^3.2.41"},"peerDependencies":{"vue-router":"^4.0.12"},"peerDependenciesMeta":{"vue-router":{"optional":true}},"repository":{"type":"git","url":"git://github.com/auth0/auth0-vue.git"},"bugs":{"url":"https://github.com/auth0/auth0-vue/issues"},"homepage":"https://github.com/auth0/auth0-vue#readme","keywords":["auth0","login","Authorization Code Grant Flow","PKCE","Single Page Application authentication","SPA authentication","Vue"],"ccu":{"name":"auth0-vue","cdn":"https://cdn.auth0.com","mainBundleFile":"auth0-vue.production.js","bucket":"assets.us.auth0.com","localPath":"dist","digest":{"hashes":["sha384"],"extensions":[".js"]}},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"gitHead":"0910d2a60f947257fd0710b15bde3ad6eb4b9022","_id":"@667/auth0-vue@2.0.1-667","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-oPYkr00qc7AfgZv9uEpb6bbnILQn/JNiilsJwhDtwP+rkmgWLZ+YXsjumd8OCXXfTqgaKihpCeC+wCqDlRCI2Q==","shasum":"3e3faa175c556147e26281f85944b5087cb8e983","tarball":"https://registry.npmjs.org/@667/auth0-vue/-/auth0-vue-2.0.1-667.tgz","fileCount":37,"unpackedSize":554317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMrbkYqwhIuPEHtwRQeR0LxN71WsxiiL8/pElzFCRwWwIgbLLcrfzvfmVN1R6Uy8DP1tE7/uRZ5ykkigHCf3KmcZc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5v7PACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1oA/7BEpEDudpvMiee1oL+pHopVQQJqwcsBqe5CkQHpEAS+ghKbD8\r\nU5XG8WcKSm82Q9mqYkMD+JgaG1Fw88cEU491kGY6x+lfQTNSlP959n7F/7qL\r\nzp2LavjRmzxpB3gQ0V5qdFVn6D9MSfkTDBbPqAfLliKpyrDaHRuN/BN0vUZK\r\nEVRjutlCuu1XrXg8glnCKJDAEyXV+qmMnxEyC6VwY/QCO32v7yATkaCgsYdk\r\n/xu/g/jDWGBIIZrm9zExH6+pQQ6iorgv0bdWLkNN8Q5WZ37iVWudQMyA0irC\r\nFyXiYWBU/8/L7AinApZLPybDXVnShSC03pVjspaDIcTV66Uzg4UwRrf5WX0b\r\nrzC6l9RbmgESSjZyz/ONkqyAkbo8+Vuq6yjoZUnYYMGEnz/VAObGhTRjcnq2\r\nN6+kQxp2cXDETs6bi1rbv5CELxVV86EuhY1qR+S2+J979Pwj73/z5m8irtpi\r\n8VFPk71HpviImaKbdN9NsHH7tVhh76WVw0yNNMYzSgfyWIhfQJ9pbNDAoqRG\r\nikdVHC1K6GT8RCp3sXLuPBbKR5DfJ8I2VzjEyljk+683P8ovHFSgUaycsnep\r\nHu1jc5V3Q7EUHKMcUtxQwtTh641Ai9JxCEEma3wm0GEzUedMLBRlbSPWU2G+\r\n8iijoy+Jeb0Gv5xh5//nFSmspgv0ddBM+kc=\r\n=xnrn\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"667","email":"667@june07.com"},"directories":{},"maintainers":[{"name":"667","email":"667@june07.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auth0-vue_2.0.1-667_1676082894847_0.5499682598837228"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-11T02:34:54.797Z","2.0.1-667":"2023-02-11T02:34:55.057Z","modified":"2023-02-11T02:34:55.220Z"},"maintainers":[{"name":"667","email":"667@june07.com"}],"description":"Auth0 SDK for Vue Applications using Authorization Code Grant Flow with PKCE","homepage":"https://github.com/auth0/auth0-vue#readme","keywords":["auth0","login","Authorization Code Grant Flow","PKCE","Single Page Application authentication","SPA authentication","Vue"],"repository":{"type":"git","url":"git://github.com/auth0/auth0-vue.git"},"author":{"name":"Auth0"},"bugs":{"url":"https://github.com/auth0/auth0-vue/issues"},"license":"MIT","readme":"![Auth0 SDK for Vue 3 Single Page Applications](https://cdn.auth0.com/website/sdks/banners/auth0-vue-banner.png)\n\n![Release](https://img.shields.io/npm/v/@auth0/auth0-vue)\n[![Codecov](https://codecov.io/gh/auth0/auth0-vue/branch/main/graph/badge.svg)](https://codecov.io/gh/auth0/auth0-vue)\n![Downloads](https://img.shields.io/npm/dw/@auth0/auth0-vue)\n[![License](https://img.shields.io/:license-mit-blue.svg?style=flat)](https://opensource.org/licenses/MIT)\n[![CircleCI](https://img.shields.io/circleci/build/github/auth0/auth0-vue)](https://circleci.com/gh/auth0/auth0-vue)\n\n📚 [Documentation](#documentation) - 🚀 [Getting Started](#getting-started) - 💻 [API Reference](#api-reference) - 💬 [Feedback](#feedback)\n\n## Documentation\n\n- [Quickstart](https://auth0.com/docs/quickstart/spa/vuejs) - our interactive guide for quickly adding login, logout and user information to a Vue 3 app using Auth0.\n- [Sample App](https://github.com/auth0-samples/auth0-vue-samples/tree/master/01-Login) - a full-fledged Vue 3 application integrated with Auth0.\n- [FAQs](https://github.com/auth0/auth0-vue/tree/main/FAQ.md) - frequently asked questions about the auth0-vue SDK.\n- [Examples](https://github.com/auth0/auth0-vue/tree/main/EXAMPLES.md) - code samples for common Vue 3 authentication scenario's.\n- [Docs site](https://www.auth0.com/docs) - explore our docs site and learn more about Auth0.\n\n## Getting started\n\n### Requirements\n\nThis library supports **Vue 3** applications.\nFor integrating Auth0 with a Vue 2 application, please read [the Vue 2 Tutorial](https://github.com/auth0/auth0-vue/blob/main/tutorial/vue2-login.md).\n\n### Installation\n\nUsing [npm](https://npmjs.org):\n\n```sh\nnpm install @auth0/auth0-vue\n```\n\nUsing [yarn](https://yarnpkg.com):\n\n```sh\nyarn add @auth0/auth0-vue\n```\n\n### Configure Auth0\n\nCreate a **Single Page Application** in the [Auth0 Dashboard](https://manage.auth0.com/#/applications).\n\n> **If you're using an existing application**, verify that you have configured the following settings in your Single Page Application:\n>\n> - Click on the \"Settings\" tab of your application's page.\n> - Ensure that \"Token Endpoint Authentication Method\" under \"Application Properties\" is set to \"None\"\n> - Scroll down and click on the \"Show Advanced Settings\" link.\n> - Under \"Advanced Settings\", click on the \"OAuth\" tab.\n> - Ensure that \"JsonWebToken Signature Algorithm\" is set to `RS256` and that \"OIDC Conformant\" is enabled.\n\nNext, 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> 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\nTake 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 an instance of the `Auth0Plugin` by calling `createAuth0` and pass it to Vue's `app.use()`.\n\n```js\nimport { createAuth0 } from '@auth0/auth0-vue';\n\nconst app = createApp(App);\n\napp.use(\n  createAuth0({\n    domain: '<AUTH0_DOMAIN>',\n    clientId: '<AUTH0_CLIENT_ID>',\n    authorizationParams: {\n      redirect_uri: '<MY_CALLBACK_URL>'\n    }\n  })\n);\n\napp.mount('#app');\n```\n\n### Add login to your application\n\nIn order to add login to your application you can use the `loginWithRedirect` function that is exposed on the return value of `useAuth0`, which you can access in your component's `setup` function.\n\n```html\n<script>\n  import { useAuth0 } from '@auth0/auth0-vue';\n\n  export default {\n    setup() {\n      const { loginWithRedirect } = useAuth0();\n\n      return {\n        login: () => {\n          loginWithRedirect();\n        }\n      };\n    }\n  };\n</script>\n```\n\nOnce setup returns the correct method, you can call that method from your component's HTML.\n\n```html\n<template>\n  <div>\n    <button @click=\"login\">Log in</button>\n  </div>\n</template>\n```\n\n<details>\n  <summary>Using Options API</summary>\n\n```html\n<template>\n  <div>\n    <button @click=\"login\">Log in</button>\n  </div>\n</template>\n\n<script>\n  export default {\n    methods: {\n      login() {\n        this.$auth0.loginWithRedirect();\n      }\n    }\n  };\n</script>\n```\n\n</details>\n\nFor more code samples on how to integrate the **auth0-vue** SDK in your **Vue 3** application, have a look at our [examples](https://github.com/auth0/auth0-vue/tree/main/EXAMPLES.md).\n\n## API reference\n\nExplore public API's available in auth0-vue.\n\n- [createAuth0](https://auth0.github.io/auth0-vue/functions/createAuth0.html)\n- [createAuthGuard](https://auth0.github.io/auth0-vue/functions/createAuthGuard.html)\n- [useAuth0](https://auth0.github.io/auth0-vue/functions/useAuth0.html)\n- [Auth0PluginOptions](https://auth0.github.io/auth0-vue/interfaces/Auth0PluginOptions.html)\n- [Auth0VueClientOptions](https://auth0.github.io/auth0-vue/interfaces/Auth0VueClientOptions.html)\n- [Auth0VueClient](https://auth0.github.io/auth0-vue/interfaces/Auth0VueClient.html)\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/auth0-vue/blob/main/CONTRIBUTING.md)\n\n### Raise an issue\n\nTo provide feedback or report a bug, please [raise an issue on our issue tracker](https://github.com/auth0/auth0-vue/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/responsible-disclosure-policy) details the procedure for disclosing security issues.\n\n---\n\n<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png\"   width=\"150\">\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://cdn.auth0.com/website/sdks/logos//auth0_dark_mode.png\" width=\"150\">\n    <img alt=\"Auth0 Logo\" src=\"https://cdn.auth0.com/website/sdks/logos/auth0_light_mode.png\" width=\"150\">\n  </picture>\n</p>\n<p align=\"center\">Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout <a href=\"https://auth0.com/why-auth0\">Why Auth0?</a></p>\n<p align=\"center\">\nThis project is licensed under the MIT license. See the <a href=\"https://github.com/auth0/auth0-vue/blob/main/LICENSE\"> LICENSE</a> file for more info.</p>\n","readmeFilename":"README.md"}