{"_id":"@aborn.jiang/nuxt-openid-connect","name":"@aborn.jiang/nuxt-openid-connect","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.1":{"name":"@aborn.jiang/nuxt-openid-connect","version":"0.2.1","description":"An nuxt 3 module with OpenID-Connect(OIDC) implemetation","keywords":["nuxt","oidc","module","nuxt 3.0","auth"],"repository":{"type":"git","url":"git+https://github.com/aborn/nuxt-openid-connect.git"},"license":"MIT","type":"module","exports":{".":{"import":"./dist/module.mjs","require":"./dist/module.cjs"}},"main":"./dist/module.cjs","types":"./dist/types.d.ts","scripts":{"prepack":"nuxt-module-build","dev":"nuxi dev playground","dev:build":"nuxi build playground","dev:prepare":"nuxt-module-build --stub && nuxi prepare playground"},"dependencies":{"@nuxt/kit":"^3.0.0-rc.3","buffer":"^6.0.3","defu":"^6.0.0","openid-client":"^5.1.6","uuid":"^8.3.2"},"devDependencies":{"@nuxt/module-builder":"latest","@nuxtjs/eslint-config-typescript":"latest","eslint":"latest","nuxt":"^3.0.0-rc.3"},"bugs":{"url":"https://github.com/aborn/nuxt-openid-connect/issues"},"homepage":"https://github.com/aborn/nuxt-openid-connect#readme","author":{"name":"aborn"},"gitHead":"88a0893e280b4b8ed80bb20bc0d23b41d640d1dc","_id":"@aborn.jiang/nuxt-openid-connect@0.2.1","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-f6Aj5g8hxQOYeMCUKUrrUbL7fIOWNSJMwZWLrCqJUArEec13teNSbRpgOjl3RWOOnSYh1e9YEtufbQnEn2QKfg==","shasum":"fe77fc9d8cec483d29f24b8a7df645dc42808444","tarball":"https://registry.npmjs.org/@aborn.jiang/nuxt-openid-connect/-/nuxt-openid-connect-0.2.1.tgz","fileCount":31,"unpackedSize":21200,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFAo/qnbDoHZnxORGbJOQCOy5DbTS904l+ywQDrtAQiuAiBP891l9eOnQZB2zHu7NBjQL4/hLcZ3kQzzlzDxaURqRQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivlyYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEGQ/9Gwv/fgJEzyPZfclqdJasKCd3IpJ62kKJs0Nj2GVBhGNOQHka\r\n5M4ymu+eBcvfAjCHzVDjGg63FYzlbfGUsffNF1HC/0lVNzJBlQWAUX7v71Zg\r\nbEMZm+3Hwlp4XfMUdKNdQQYdlyyriN3df80wf9xcl3sZOXEB284x6Los9Jhm\r\nhFkgyE8uzgltIVmXTUDXuku5H+4/UE7uThW+CUiVcTj91nAo8VPpZB0alZdu\r\nqqKadrd6Rv718LMUQDWT2tXBs23/WVW/r9iZFXBZE+Pjxiuk8cxKqSpV7Vfo\r\n+11QbebwZdP/Z5RSRnk/JMv8AW4kgomPy1hbKOpb1sZh9CS5Zbnyvm6rCypb\r\nTkb2jO5wgviTbiptefD7PqoEuLgz5hJFbsyUnQiJeXkm4SnWXq23y00OjeLH\r\ni7tXyaD4RC9L3Swz0grN8gYy8igVvP/dItGOC/gERxWBTasE7wG7DrFvCHw0\r\n6iNlrULgPjAJdaRAL1XQoq4ZnpoSrIR7UDcyR0axFRCQ8/PRwiFX/zxjhdZ4\r\nkG/+c31fKsiZ0paYx9rm9sJo0BIWfoUCGdO0hYm0+4BDGQfcjJ1qlH3z9vWu\r\nswpDsrbMhHhtlqf55ZWEpe4WtvEYOs5+NcTPknStazoGRPAylJzh4vABXIUt\r\nzwJA9vnMZ4gSYTYR8UMgtXjpTk3EvYTFVM4=\r\n=nsL6\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aborn.jiang","email":"aborn.jiang@gmail.com"},"directories":{},"maintainers":[{"name":"aborn.jiang","email":"aborn.jiang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nuxt-openid-connect_0.2.1_1656642712128_0.08110474525927036"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-01T02:31:52.057Z","0.2.1":"2022-07-01T02:31:52.304Z","modified":"2022-07-01T02:31:52.460Z"},"maintainers":[{"name":"aborn.jiang","email":"aborn.jiang@gmail.com"}],"description":"An nuxt 3 module with OpenID-Connect(OIDC) implemetation","homepage":"https://github.com/aborn/nuxt-openid-connect#readme","keywords":["nuxt","oidc","module","nuxt 3.0","auth"],"repository":{"type":"git","url":"git+https://github.com/aborn/nuxt-openid-connect.git"},"author":{"name":"aborn"},"bugs":{"url":"https://github.com/aborn/nuxt-openid-connect/issues"},"license":"MIT","readme":"# Nuxt OpenID-Connect\nOpenID-Connect(OIDC) integration module for nuxt 3.0.\n\n## Features\n\n- An [**Nuxt 3**](https://v3.nuxtjs.org) module.\n- OIDC integration ( implemetation base [openid-client](https://github.com/panva/node-openid-client) ).\n- [State Management](https://v3.nuxtjs.org/guide/features/state-management/), shared login user info.\n- OIDC provider config.\n- Encrypt userInfo cookie (V0.2+).\n- Support browser localStorage store userInfo, which keep user auth info after page refresh. Similar like [this](https://stackoverflow.com/questions/68174642/how-to-keep-user-authenticated-after-refreshing-the-page-in-nuxtjs).\n\n## Why use this module \n\n- The official [auth](https://github.com/nuxt-community/auth-module/issues/1719) module doesn't support Nuxt 3.0 yet.\n- [nuxt-oidc](https://github.com/deko2369/nuxt-oidc) also not support Nuxt 3.0.\n\n## How to use this module\n\n- Add to a project\n```bash\nyarn add nuxt-openid-connect\n```\n\n- Then, add nuxt-openid-connect to the modules section of nuxt.config.ts and modify config depend yours:\n```ts\nimport { defineNuxtConfig } from 'nuxt'\n\nexport default defineNuxtConfig({\n  modules: [\n    'nuxt-openid-connect'\n  ],\n  openidConnect: {\n    addPlugin: true,\n    op: {\n      issuer: 'your_issuer_value',\n      clientId: 'clientid',\n      clientSecret: 'secret',\n      callbackUrl: 'http://localhost:3000/oidc/cbt',\n      scope: [\n        'email',\n        'profile',\n        'address'\n      ]\n    },\n    session: {\n      cookie: {},\n      cookiePrefix: 'oidc._',\n      secret: 'oidc._sessionid',\n      maxAge: 24 * 60 * 60       // one day\n    }\n  }\n})\n\n```\n\nHere is an [using example](https://github.com/aborn/playgrounds/tree/main/nuxt-openid-connect-demo).\n\n## 💻 Development\n\n- Clone repository\n- Install dependencies using `yarn install`\n- Run `npm run dev:prepare` to generate type stubs.\n- Use `npm run dev` to start [playground](./playground) in development mode.\n\n## License\n\n[MIT](./LICENSE) - Made with 💚\n","readmeFilename":"README.md"}