{"_id":"@andychukse/nuxt-auth","_rev":"9-a4d65caa3974c76048930d7322f94b8d","name":"@andychukse/nuxt-auth","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@andychukse/nuxt-auth","version":"1.0.0","keywords":["nuxt","nuxt3","authentication","auth","jwt","social-login","google-auth","module"],"author":{"name":"Andrew Eze"},"license":"MIT","_id":"@andychukse/nuxt-auth@1.0.0","maintainers":[{"name":"andychukse","email":"pacodas@nairabrains.com"}],"homepage":"https://github.com/andychukse/nuxt-simple-auth#readme","bugs":{"url":"https://github.com/andychukse/nuxt-simple-auth/issues"},"dist":{"shasum":"c3e9ab643d79bba41253c0c050a5fe473d26d39e","tarball":"https://registry.npmjs.org/@andychukse/nuxt-auth/-/nuxt-auth-1.0.0.tgz","fileCount":19,"integrity":"sha512-uarz2v1N2C9c27q2bis7BCzfBgADbWuWpwjw53CNHI2dfwrv8aCXFNXzz79Lf4c436giybFMj4/ctHxk6RJ4Rw==","signatures":[{"sig":"MEUCIHNDKZMItBGPjlB/iq7BaGeFfd1jS+SC/UTGr13zUc6BAiEArWjzas+K8Ln37uRj0IOdDsnQ/hIDd5bfWSsP68QneUs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45920},"main":"./dist/module.mjs","type":"module","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"89fb731133ab6b26658cf29adff1864f8afea5bd","scripts":{"dev":"npm run dev:prepare && nuxi dev playground","lint":"eslint .","test":"vitest run","clean":"rm -rf playground-authjs/.nuxt playground-local/.nuxt playground-refresh/.nuxt dist .nuxt","prepack":"nuxt-module-build build","release":"npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags","lint:fix":"eslint . --fix","dev:build":"nuxi build playground","test:types":"vue-tsc --noEmit && cd playground && vue-tsc --noEmit","test:watch":"vitest watch","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground"},"_npmUser":{"name":"andychukse","actor":{"name":"andychukse","type":"user","email":"pacodas@nairabrains.com"},"email":"pacodas@nairabrains.com"},"repository":{"url":"git+https://github.com/andychukse/nuxt-simple-auth.git","type":"git"},"_npmVersion":"10.8.2","description":"A Simple Nuxt authentication module with JWT and social login support for Nuxt Apps with separate backend","directories":{},"_nodeVersion":"20.18.0","dependencies":{"defu":"^6.1.4","@nuxt/kit":"^3.17.6"},"typesVersions":{"*":{".":["./dist/types.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"nuxt":"^3.17.6","eslint":"^9.30.0","vitest":"^3.2.4","vue-tsc":"^2.2.10","typescript":"~5.8.3","@types/node":"latest","changelogen":"^0.6.1","@nuxt/schema":"^3.17.6","@nuxt/devtools":"^2.6.0","@nuxt/test-utils":"^3.19.1","@nuxt/eslint-config":"^1.4.1","@nuxt/module-builder":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-auth_1.0.0_1751501354116_0.7200666496869939","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@andychukse/nuxt-auth","version":"1.0.1","keywords":["nuxt","nuxt3","authentication","auth","jwt","social-login","google-auth","module"],"author":{"name":"Andrew Eze"},"license":"MIT","_id":"@andychukse/nuxt-auth@1.0.1","maintainers":[{"name":"andychukse","email":"pacodas@nairabrains.com"}],"homepage":"https://github.com/andychukse/nuxt-auth#readme","bugs":{"url":"https://github.com/andychukse/nuxt-auth/issues"},"dist":{"shasum":"f537f9ea1e398e243eec9b4be5dda8c6f765b388","tarball":"https://registry.npmjs.org/@andychukse/nuxt-auth/-/nuxt-auth-1.0.1.tgz","fileCount":19,"integrity":"sha512-9LMkuJ6Ml/fipQF3WmUazlZY99e2RkOWt6BxGNxdMazbay6B/yYwCEH4mSpnIF3ira0c/hLgw05VKq6T7rLxyA==","signatures":[{"sig":"MEQCIAgF13xC4dj/Ih1+Ok2sXBmdwIxTlcLVSfystctEyxY8AiBjioKVSEnD2+o6llQQkYMW0MDZj+OUrSK18MBSirwiOA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45899},"main":"./dist/module.mjs","type":"module","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"ada929f5dee1ca2d7c64063a60eea02cb578b433","scripts":{"dev":"npm run dev:prepare && nuxi dev playground","lint":"eslint .","test":"vitest run","clean":"rm -rf playground-authjs/.nuxt playground-local/.nuxt playground-refresh/.nuxt dist .nuxt","prepack":"nuxt-module-build build","release":"npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags","lint:fix":"eslint . --fix","dev:build":"nuxi build playground","test:types":"vue-tsc --noEmit && cd playground && vue-tsc --noEmit","test:watch":"vitest watch","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground"},"_npmUser":{"name":"andychukse","actor":{"name":"andychukse","type":"user","email":"pacodas@nairabrains.com"},"email":"pacodas@nairabrains.com"},"repository":{"url":"git+https://github.com/andychukse/nuxt-auth.git","type":"git"},"_npmVersion":"10.8.2","description":"A Simple Nuxt authentication module with JWT and social login support for Nuxt Apps with separate backend","directories":{},"_nodeVersion":"20.18.0","dependencies":{"defu":"^6.1.4","@nuxt/kit":"^3.17.6"},"typesVersions":{"*":{".":["./dist/types.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"nuxt":"^3.17.6","eslint":"^9.30.0","vitest":"^3.2.4","vue-tsc":"^2.2.10","typescript":"~5.8.3","@types/node":"latest","changelogen":"^0.6.1","@nuxt/schema":"^3.17.6","@nuxt/devtools":"^2.6.0","@nuxt/test-utils":"^3.19.1","@nuxt/eslint-config":"^1.4.1","@nuxt/module-builder":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-auth_1.0.1_1751501628856_0.2892380626722233","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@andychukse/nuxt-auth","version":"1.0.2","keywords":["nuxt","nuxt3","authentication","auth","jwt","social-login","google-auth","module"],"author":{"name":"Andrew Eze"},"license":"MIT","_id":"@andychukse/nuxt-auth@1.0.2","maintainers":[{"name":"andychukse","email":"pacodas@nairabrains.com"}],"homepage":"https://github.com/andychukse/nuxt-auth#readme","bugs":{"url":"https://github.com/andychukse/nuxt-auth/issues"},"dist":{"shasum":"af63ce4193a22cd11a128772e74fa13521903d01","tarball":"https://registry.npmjs.org/@andychukse/nuxt-auth/-/nuxt-auth-1.0.2.tgz","fileCount":19,"integrity":"sha512-avX6iqc1e9j34tw7P0lzFRoVoQSXMxLjNr1GEVjpJJkYovErdPg1tgPsmdGv+5x0G1qseyzfqzGEOdWEGACa5g==","signatures":[{"sig":"MEQCICHn8IVoMGYIbJqq2Nj3xyeXVswGYnojsXOT8WV1v19gAiB1V9JEw/xA1V8bVULHia0ln+Pi2b4US50NuyVKnUDAPw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45911},"main":"./dist/module.mjs","type":"module","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"5079ab5017c608c16bed6097b997caa0775caf40","scripts":{"dev":"npm run dev:prepare && nuxi dev playground","lint":"eslint .","test":"vitest run","clean":"rm -rf playground-authjs/.nuxt playground-local/.nuxt playground-refresh/.nuxt dist .nuxt","prepack":"nuxt-module-build build","release":"npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags","lint:fix":"eslint . --fix","dev:build":"nuxi build playground","test:types":"vue-tsc --noEmit && cd playground && vue-tsc --noEmit","test:watch":"vitest watch","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground"},"_npmUser":{"name":"andychukse","actor":{"name":"andychukse","type":"user","email":"pacodas@nairabrains.com"},"email":"pacodas@nairabrains.com"},"repository":{"url":"git+https://github.com/andychukse/nuxt-auth.git","type":"git"},"_npmVersion":"10.8.2","description":"A Simple Nuxt authentication module with JWT and social login support for Nuxt Apps with separate backend","directories":{},"_nodeVersion":"20.18.0","dependencies":{"defu":"^6.1.4","@nuxt/kit":"^3.17.6"},"typesVersions":{"*":{".":["./dist/types.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"nuxt":"^3.17.6","eslint":"^9.30.0","vitest":"^3.2.4","vue-tsc":"^2.2.10","typescript":"~5.8.3","@types/node":"latest","changelogen":"^0.6.1","@nuxt/schema":"^3.17.6","@nuxt/devtools":"^2.6.0","@nuxt/test-utils":"^3.19.1","@nuxt/eslint-config":"^1.4.1","@nuxt/module-builder":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-auth_1.0.2_1751505321057_0.818641543850388","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@andychukse/nuxt-auth","version":"1.0.3","keywords":["nuxt","nuxt3","authentication","auth","jwt","social-login","google-auth","module"],"author":{"name":"Andrew Eze"},"license":"MIT","_id":"@andychukse/nuxt-auth@1.0.3","maintainers":[{"name":"andychukse","email":"pacodas@nairabrains.com"}],"homepage":"https://github.com/andychukse/nuxt-auth#readme","bugs":{"url":"https://github.com/andychukse/nuxt-auth/issues"},"dist":{"shasum":"aec8a03d86f9d31f45edfc409a49427224f6bafc","tarball":"https://registry.npmjs.org/@andychukse/nuxt-auth/-/nuxt-auth-1.0.3.tgz","fileCount":27,"integrity":"sha512-HiINN37HUq3N0xyuf4TFb3OI55LffdN6DzUTGa7SZ5YocggytF9DztC+tjyt4LkmwAWD42tFtCitN72s+e5i9A==","signatures":[{"sig":"MEUCIQDvEuuR64VPEyeYn+jiSQFiGp5phX5HKAO4cZd9AZUl8AIgdbZQN3PtMS4PvkpYU9mufzYLYJUu03CYD3aOi0JBaNE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56603},"main":"./dist/module.mjs","type":"module","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"06dba6e3b1e96b3e739eb325e5fdc543f95fa18c","scripts":{"dev":"npm run dev:prepare && nuxi dev playground","lint":"eslint .","test":"vitest run","clean":"rm -rf playground-authjs/.nuxt playground-local/.nuxt playground-refresh/.nuxt dist .nuxt","prepack":"nuxt-module-build build","release":"npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags","lint:fix":"eslint . --fix","dev:build":"nuxi build playground","test:types":"vue-tsc --noEmit && cd playground && vue-tsc --noEmit","test:watch":"vitest watch","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground"},"_npmUser":{"name":"andychukse","actor":{"name":"andychukse","type":"user","email":"pacodas@nairabrains.com"},"email":"pacodas@nairabrains.com"},"repository":{"url":"git+https://github.com/andychukse/nuxt-auth.git","type":"git"},"_npmVersion":"10.8.2","description":"A Simple Nuxt authentication module with JWT and social login support for Nuxt Apps with separate backend","directories":{},"_nodeVersion":"20.18.0","dependencies":{"defu":"^6.1.4","@nuxt/kit":"^3.17.6"},"typesVersions":{"*":{".":["./dist/types.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"nuxt":"^3.17.6","eslint":"^9.30.0","vitest":"^3.2.4","vue-tsc":"^2.2.10","typescript":"~5.8.3","@types/node":"latest","changelogen":"^0.6.1","@nuxt/schema":"^3.17.6","@nuxt/devtools":"^2.6.0","@nuxt/test-utils":"^3.19.1","@nuxt/eslint-config":"^1.4.1","@nuxt/module-builder":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-auth_1.0.3_1751928887502_0.9185972619910652","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@andychukse/nuxt-auth","version":"1.0.5","keywords":["nuxt","nuxt3","authentication","auth","jwt","social-login","google-auth","module"],"author":{"name":"Andrew Eze"},"license":"MIT","_id":"@andychukse/nuxt-auth@1.0.5","maintainers":[{"name":"andychukse","email":"pacodas@nairabrains.com"}],"homepage":"https://github.com/andychukse/nuxt-auth#readme","bugs":{"url":"https://github.com/andychukse/nuxt-auth/issues"},"dist":{"shasum":"907a155055fdf14dd7ab3f21c1743dc71d3cb252","tarball":"https://registry.npmjs.org/@andychukse/nuxt-auth/-/nuxt-auth-1.0.5.tgz","fileCount":27,"integrity":"sha512-RlQutMsXHhQ3YXfraRsPPQHpipBonWKpBldSb8X8+DS3Mt9u3S0tBSEHKKVrJMVWkufkQxJJhe5CwB5Qf/6mSw==","signatures":[{"sig":"MEUCIQD5nIhFMlakzwKl16lNi0lWcUA+YtebiL8oAUU22BKyYQIgNxRxbcLg8XRUNJNn0nDeSBX9fuIVOnbgz3QL9Ur25vw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56713},"main":"./dist/module.mjs","type":"module","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"aa804fc7792b4c678b0944178ec36ae306c0feb4","scripts":{"dev":"npm run dev:prepare && nuxi dev playground","lint":"eslint .","test":"vitest run","clean":"rm -rf playground-authjs/.nuxt playground-local/.nuxt playground-refresh/.nuxt dist .nuxt","prepack":"nuxt-module-build build","release":"npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags","lint:fix":"eslint . --fix","dev:build":"nuxi build playground","test:types":"vue-tsc --noEmit && cd playground && vue-tsc --noEmit","test:watch":"vitest watch","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground"},"_npmUser":{"name":"andychukse","email":"pacodas@nairabrains.com"},"repository":{"url":"git+https://github.com/andychukse/nuxt-auth.git","type":"git"},"_npmVersion":"10.9.2","description":"A Simple Nuxt authentication module with JWT and social login support for Nuxt Apps with separate backend","directories":{},"_nodeVersion":"22.17.0","dependencies":{"defu":"^6.1.4","@nuxt/kit":"^3.17.6"},"typesVersions":{"*":{".":["./dist/types.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"nuxt":"^3.17.6","eslint":"^9.30.0","vitest":"^3.2.4","vue-tsc":"^2.2.10","typescript":"~5.8.3","@types/node":"latest","changelogen":"^0.6.1","@nuxt/schema":"^3.17.6","@nuxt/devtools":"^2.6.0","@nuxt/test-utils":"^3.19.1","@nuxt/eslint-config":"^1.4.1","@nuxt/module-builder":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-auth_1.0.5_1756402889870_0.34696237341086844","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@andychukse/nuxt-auth","version":"1.1.1","keywords":["nuxt","nuxt3","authentication","auth","jwt","social-login","google-auth","module"],"author":{"name":"Andrew Eze"},"license":"MIT","_id":"@andychukse/nuxt-auth@1.1.1","maintainers":[{"name":"andychukse","email":"pacodas@nairabrains.com"}],"homepage":"https://github.com/andychukse/nuxt-auth#readme","bugs":{"url":"https://github.com/andychukse/nuxt-auth/issues"},"dist":{"shasum":"1c3e1782e58cb860d2b3a1ec201af1ab8b13eb67","tarball":"https://registry.npmjs.org/@andychukse/nuxt-auth/-/nuxt-auth-1.1.1.tgz","fileCount":27,"integrity":"sha512-OGIM4VAbMvK/a2hXl0T0Cw472bHKUDbihH57ijWmf7W041TDCRN6wkEE8SFDssOeZuh4VANLP6joHmaPpgW8bg==","signatures":[{"sig":"MEYCIQDp2+O1pEnhri/vZCvpRU6Q1iD6kLIInneKKgNvYjqRVAIhALSlgHLWfgiaSbYLdwL3jPoc6ipQIAjg44lylUvgp9L+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56734},"main":"./dist/module.mjs","type":"module","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"46042d5e5dc5ce03911452d6c5448e255fe551ef","scripts":{"dev":"npm run dev:prepare && nuxi dev playground","lint":"eslint .","test":"vitest run","clean":"rm -rf playground-authjs/.nuxt playground-local/.nuxt playground-refresh/.nuxt dist .nuxt","prepack":"nuxt-module-build build","release":"npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags","lint:fix":"eslint . --fix","dev:build":"nuxi build playground","test:types":"vue-tsc --noEmit && cd playground && vue-tsc --noEmit","test:watch":"vitest watch","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground"},"_npmUser":{"name":"andychukse","email":"pacodas@nairabrains.com"},"repository":{"url":"git+https://github.com/andychukse/nuxt-auth.git","type":"git"},"_npmVersion":"10.9.2","description":"A Simple Nuxt authentication module with JWT and social login support for Nuxt Apps with separate backend","directories":{},"_nodeVersion":"22.17.0","dependencies":{"defu":"^6.1.4","@nuxt/kit":"^4.2.1"},"typesVersions":{"*":{".":["./dist/types.d.mts"]}},"_hasShrinkwrap":false,"devDependencies":{"nuxt":"^4.2.1","eslint":"^9.39.1","vitest":"^3.2.4","vue-tsc":"^3.1.7","typescript":"~5.9.3","@types/node":"latest","changelogen":"^0.6.2","@nuxt/schema":"^4.2.1","@nuxt/devtools":"^3.1.1","@nuxt/test-utils":"^3.21.0","@nuxt/eslint-config":"^1.11.0","@nuxt/module-builder":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/nuxt-auth_1.1.1_1765301112990_0.9274970753315808","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@andychukse/nuxt-auth","version":"1.1.2","description":"A Simple Nuxt authentication module with JWT and social login support for Nuxt Apps with separate backend","keywords":["nuxt","nuxt3","authentication","auth","jwt","social-login","google-auth","module"],"author":{"name":"Andrew Eze"},"license":"MIT","main":"./dist/module.mjs","type":"module","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"typesVersions":{"*":{".":["./dist/types.d.mts"]}},"scripts":{"prepack":"nuxt-module-build build","dev":"npm run dev:prepare && nuxi dev playground","dev:build":"nuxi build playground","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground","release":"npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags","lint":"eslint .","lint:fix":"eslint . --fix","test":"vitest run","test:watch":"vitest watch","test:types":"vue-tsc --noEmit && cd playground && vue-tsc --noEmit","clean":"rm -rf playground-authjs/.nuxt playground-local/.nuxt playground-refresh/.nuxt dist .nuxt"},"dependencies":{"defu":"^6.1.4","@nuxt/kit":"^4.2.1"},"devDependencies":{"@nuxt/devtools":"^3.1.1","@nuxt/eslint-config":"^1.11.0","@nuxt/module-builder":"^1.0.2","@nuxt/schema":"^4.2.1","@nuxt/test-utils":"^3.21.0","@types/node":"latest","changelogen":"^0.6.2","eslint":"^9.39.1","nuxt":"^4.2.1","typescript":"~5.9.3","vitest":"^3.2.4","vue-tsc":"^3.1.7"},"repository":{"type":"git","url":"git+https://github.com/andychukse/nuxt-auth.git"},"bugs":{"url":"https://github.com/andychukse/nuxt-auth/issues"},"homepage":"https://github.com/andychukse/nuxt-auth#readme","_id":"@andychukse/nuxt-auth@1.1.2","gitHead":"4e7fdd0aca8bf5d480529074574b68882ca4ec87","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-ui+lw0LSyL/H85ybgRjKFULeZvbhoyKq6HCA47ZI14IH7AfFt/1u9660d6Pbq11JfVrT1oNOaq+DEthIkTocUA==","shasum":"57dd4fc96c34ea314f7e39752324e3a8e3b2d4b4","tarball":"https://registry.npmjs.org/@andychukse/nuxt-auth/-/nuxt-auth-1.1.2.tgz","fileCount":27,"unpackedSize":54179,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB8wLtm/4M8nNQu1hDpEVBm+rKglAhzyWDzwNZiOiHHUAiEAjHQAhm+FlH/LhepbMyNL4Do2TdFhx+mmQJbG3bhot7o="}]},"_npmUser":{"name":"andychukse","email":"pacodas@nairabrains.com"},"directories":{},"maintainers":[{"name":"andychukse","email":"pacodas@nairabrains.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nuxt-auth_1.1.2_1765815372957_0.818908690512939"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-03T00:09:14.030Z","modified":"2025-12-15T16:16:13.339Z","1.0.0":"2025-07-03T00:09:14.360Z","1.0.1":"2025-07-03T00:13:49.030Z","1.0.2":"2025-07-03T01:15:21.241Z","1.0.3":"2025-07-07T22:54:47.658Z","1.0.4":"2025-07-10T09:57:12.405Z","1.0.5":"2025-08-28T17:41:30.087Z","1.1.1":"2025-12-09T17:25:13.167Z","1.1.2":"2025-12-15T16:16:13.102Z"},"bugs":{"url":"https://github.com/andychukse/nuxt-auth/issues"},"author":{"name":"Andrew Eze"},"license":"MIT","homepage":"https://github.com/andychukse/nuxt-auth#readme","keywords":["nuxt","nuxt3","authentication","auth","jwt","social-login","google-auth","module"],"repository":{"type":"git","url":"git+https://github.com/andychukse/nuxt-auth.git"},"description":"A Simple Nuxt authentication module with JWT and social login support for Nuxt Apps with separate backend","maintainers":[{"name":"andychukse","email":"pacodas@nairabrains.com"}],"readme":"# Simple Nuxt Auth\n\nA simple and flexible authentication module for Nuxt 3 with JWT and social login support. \n**This Auth Package only works for a Nuxt app that has a separate backend that handles authenthication**\n\n## Features\n\n- **JWT Authentication**: Secure token-based authentication\n- **Social Login**: Support for Google OAuth with flexible callback handling\n- **Cookie Management**: Secure HTTP-only cookies for token storage\n- **Token Refresh**: Automatic token refresh functionality\n- **Route Protection**: Built-in middleware for protecting routes\n- **Flexible Configuration**: Easy to configure and customize\n- **SSR Support**: Works with both client-side and server-side rendering\n- **TypeScript**: Full TypeScript support\n- **OAuth Flows**: Both client-side and server-side OAuth callback handling\n- **Auto-imports**: Composables and utilities are auto-imported\n\n## Quick Setup\n\n1. Add `@andychukse/nuxt-auth` dependency to your project\n\n```bash\n# Using pnpm\npnpm add @andychukse/nuxt-auth\n\n# Using yarn\nyarn add @andychukse/nuxt-auth\n\n# Using npm\nnpm install @andychukse/nuxt-auth\n```\n\n2. Add `@andychukse/nuxt-auth` to the `modules` section of `nuxt.config.ts`\n\n```js\nexport default defineNuxtConfig({\n  modules: [\n    '@andychukse/nuxt-auth'\n  ]\n})\n```\n\n3. Configure the module in your `nuxt.config.ts`\n\n```js\nexport default defineNuxtConfig({\n  modules: ['@andychukse/nuxt-auth'],\n  \n  // Configure the auth module\n  auth: {\n    isEnabled: true,\n    baseUrl: '/api/auth',\n    callback: '/',\n    endpoints: {\n      signIn: { path: '/login', method: 'post' },\n      signOut: { path: '/logout', method: 'post' },\n      signUp: { path: '/register', method: 'post' },\n      getSession: { path: '/session', method: 'get' },\n      refresh: { path: '/refresh', method: 'post' },\n      google: { path: '/google', method: 'post' },\n    },\n    token: {\n      tokenPointer: '/access_token',\n      refreshTokenPointer: '/refresh_token',\n      type: 'Bearer',\n      cookieName: 'auth.token',\n      headerName: 'Authorization',\n      maxAgeInSeconds: 86400, // 1 day\n      sameSiteAttribute: 'lax',\n      cookieDomain: '',\n      secureCookieAttribute: false,\n      httpOnlyCookieAttribute: true,\n      refresh: {\n        refreshOnlyToken: true,\n        cookieName: 'auth.refresh',\n        maxAgeInSeconds: 7776000, // 90 days\n        requestTokenPointer: '/refresh_token',\n        sameSiteAttribute: 'lax',            \n        secureCookieAttribute: false,        \n        httpOnlyCookieAttribute: true, \n      },\n    },\n    social: {\n      google: {\n        clientId: 'your-google-client-id.googleusercontent.com',\n        redirectUri: 'http://localhost:3000/auth/google/callback',\n        scopes: 'openid profile email'\n      }\n    },\n  },\n})\n```\n\n## Usage\n\n### Basic Authentication Flow\n\n```vue\n<template>\n  <div>\n    <div v-if=\"status === 'loading'\">\n      <p>Loading...</p>\n    </div>\n    <div v-else-if=\"status === 'authenticated'\">\n      <h1>Welcome {{ data?.name || data?.email }}!</h1>\n      <p>Status: {{ status }}</p>\n      <button @click=\"handleSignOut\" class=\"btn-logout\">Sign Out</button>\n    </div>\n    <div v-else>\n      <h1>Please sign in</h1>\n      <button @click=\"showLogin = true\" class=\"btn-login\">Sign In</button>\n      <button @click=\"showRegister = true\" class=\"btn-register\">Register</button>\n    </div>\n  </div>\n</template>\n\n<script setup>\nconst { status, data, signOut } = useAuth()\nconst showLogin = ref(false)\nconst showRegister = ref(false)\n\nconst handleSignOut = async () => {\n  try {\n    await signOut()\n    // User will be redirected automatically\n  } catch (error) {\n    console.error('Sign out failed:', error)\n  }\n}\n</script>\n```\n\n### Sign In Form\n\n```vue\n<template>\n  <div class=\"auth-form\">\n    <h2>Sign In</h2>\n    <form @submit.prevent=\"handleSignIn\">\n      <div class=\"form-group\">\n        <label for=\"email\">Email:</label>\n        <input \n          id=\"email\"\n          v-model=\"form.email\" \n          type=\"email\" \n          required \n          placeholder=\"Enter your email\"\n        />\n      </div>\n      \n      <div class=\"form-group\">\n        <label for=\"password\">Password:</label>\n        <input \n          id=\"password\"\n          v-model=\"form.password\" \n          type=\"password\" \n          required \n          placeholder=\"Enter your password\"\n        />\n      </div>\n      \n      <button type=\"submit\" :disabled=\"loading\" class=\"btn-submit\">\n        {{ loading ? 'Signing in...' : 'Sign In' }}\n      </button>\n      \n      <p v-if=\"error\" class=\"error\">{{ error }}</p>\n    </form>\n    \n    <!-- Social Login -->\n    <div class=\"social-login\">\n      <button @click=\"handleGoogleSignIn\" class=\"btn-google\">\n        Sign in with Google\n      </button>\n    </div>\n  </div>\n</template>\n\n<script setup>\nconst { signIn, loading } = useAuth()\n\nconst form = reactive({\n  email: '',\n  password: ''\n})\n\nconst error = ref('')\n\nconst handleSignIn = async () => {\n  try {\n    error.value = ''\n    await signIn(form, { \n      callbackUrl: '/dashboard' // Optional: redirect after login\n    })\n    // User will be redirected automatically\n  } catch (err) {\n    error.value = err.message || 'Sign in failed'\n  }\n}\n\nconst handleGoogleSignIn = async () => {\n  try {\n    // Method 1: Direct OAuth with built-in flow\n    await initiateSocialLogin('google', {\n      callbackUrl: '/dashboard'\n    })\n    // This will redirect to Google OAuth\n  } catch (err) {\n    error.value = err.message || 'Google sign in failed'\n  }\n}\n</script>\n```\n\n### Register Form\n\n```vue\n<template>\n  <div class=\"auth-form\">\n    <h2>Create Account</h2>\n    <form @submit.prevent=\"handleRegister\">\n      <div class=\"form-group\">\n        <label for=\"name\">Full Name:</label>\n        <input \n          id=\"name\"\n          v-model=\"form.name\" \n          type=\"text\" \n          required \n          placeholder=\"Enter your full name\"\n        />\n      </div>\n      \n      <div class=\"form-group\">\n        <label for=\"email\">Email:</label>\n        <input \n          id=\"email\"\n          v-model=\"form.email\" \n          type=\"email\" \n          required \n          placeholder=\"Enter your email\"\n        />\n      </div>\n      \n      <div class=\"form-group\">\n        <label for=\"password\">Password:</label>\n        <input \n          id=\"password\"\n          v-model=\"form.password\" \n          type=\"password\" \n          required \n          placeholder=\"Choose a password\"\n          minlength=\"8\"\n        />\n      </div>\n      \n      <div class=\"form-group\">\n        <label for=\"confirmPassword\">Confirm Password:</label>\n        <input \n          id=\"confirmPassword\"\n          v-model=\"form.confirmPassword\" \n          type=\"password\" \n          required \n          placeholder=\"Confirm your password\"\n        />\n      </div>\n      \n      <button type=\"submit\" :disabled=\"loading || !isFormValid\" class=\"btn-submit\">\n        {{ loading ? 'Creating account...' : 'Create Account' }}\n      </button>\n      \n      <p v-if=\"error\" class=\"error\">{{ error }}</p>\n    </form>\n  </div>\n</template>\n\n<script setup>\nconst { signUp, loading } = useAuth()\n\nconst form = reactive({\n  name: '',\n  email: '',\n  password: '',\n  confirmPassword: ''\n})\n\nconst error = ref('')\n\nconst isFormValid = computed(() => {\n  return form.password === form.confirmPassword && \n         form.password.length >= 8\n})\n\nconst handleRegister = async () => {\n  try {\n    error.value = ''\n    \n    if (!isFormValid.value) {\n      error.value = 'Please check your password'\n      return\n    }\n    \n    await signUp({\n      name: form.name,\n      email: form.email,\n      password: form.password\n    }, {\n      callbackUrl: '/welcome' // Optional: redirect after registration\n    })\n    // User will be redirected automatically\n  } catch (err) {\n    error.value = err.message || 'Registration failed'\n  }\n}\n</script>\n```\n\n### Advanced Google OAuth Integration\n\nThe module provides two ways to handle Google OAuth:\n\n#### 1. Client-Side Callback (Recommended for SPAs)\n\n```vue\n<template>\n  <div>\n    <button @click=\"signInWithGoogle\" class=\"google-btn\">\n      <svg><!-- Google icon --></svg>\n      Continue with Google\n    </button>\n  </div>\n</template>\n\n<script setup>\nconst { initiateSocialLogin } = useAuth()\n\nconst signInWithGoogle = async () => {\n  try {\n    // This will redirect to Google OAuth and handle the callback client-side\n    await initiateSocialLogin('google', {\n      clientId: 'your-google-client-id',\n      redirectUri: 'http://localhost:3000/auth/google/callback',\n      scopes: 'openid profile email',\n      callbackUrl: '/dashboard' // Where to go after successful auth\n    })\n  } catch (error) {\n    console.error('Google OAuth failed:', error)\n  }\n}\n</script>\n```\n\nCreate the callback page at `/pages/auth/google/callback.vue`:\n\n```vue\n<template>\n  <div class=\"callback-handler\">\n    <div v-if=\"loading\">\n      <p>Processing Google authentication...</p>\n    </div>\n    <div v-else-if=\"error\">\n      <p>Authentication failed: {{ error }}</p>\n      <button @click=\"$router.push('/login')\">Back to Login</button>\n    </div>\n  </div>\n</template>\n\n<script setup>\nconst { handleSocialCallback } = useAuth()\nconst route = useRoute()\n\nconst loading = ref(true)\nconst error = ref('')\n\nonMounted(async () => {\n  try {\n    const { code, state } = route.query\n    \n    if (code) {\n      await handleSocialCallback('google', code, state)\n      // User will be redirected to callbackUrl automatically\n    } else {\n      throw new Error('No authorization code received')\n    }\n  } catch (err) {\n    error.value = err.message\n  } finally {\n    loading.value = false\n  }\n})\n</script>\n```\n\n#### 2. Server-Side Callback (Recommended for SSR)\n\n```vue\n<script setup>\nconst { initiateSocialLogin } = useAuth()\n\nconst signInWithGoogleSSR = async () => {\n  try {\n    // This will use server-side callback handling\n    await initiateSocialLogin('google', {\n      callbackUrl: '/dashboard',\n      callbackPage: 'auth/custom-handler' // Server will redirect here with OAuth params\n    })\n  } catch (error) {\n    console.error('Google OAuth failed:', error)\n  }\n}\n</script>\n```\n\n### Route Protection with Middleware\n\nProtect routes by adding the `auth` middleware:\n\n```vue\n<script setup>\ndefinePageMeta({\n  middleware: 'auth'\n})\n</script>\n\n<template>\n  <div>\n    <h1>Protected Page</h1>\n    <p>This page is only accessible to authenticated users.</p>\n  </div>\n</template>\n```\n\nFor guest-only pages (login, register), use the `guest` middleware:\n\n```vue\n<script setup>\ndefinePageMeta({\n  middleware: 'guest'\n})\n</script>\n\n<template>\n  <div>\n    <h1>Login Page</h1>\n    <!-- Login form here -->\n  </div>\n</template>\n```\n\n### Social Authentication\n\nFor Google authentication:\n\n```vue\n<template>\n  <button @click=\"signInWithGoogle\">Sign in with Google</button>\n</template>\n\n<script setup>\nconst { signInWithSocial } = useAuth()\n\nconst signInWithGoogle = async () => {\n  try {\n    await signInWithSocial('google', { \n      code: 'google-auth-code',\n      state: 'random-state' \n    })\n  } catch (error) {\n    console.error('Google sign-in failed:', error)\n  }\n}\n</script>\n```\n\n## API Reference\n\n### `useAuth()`\n\nThe main composable that provides authentication functionality.\n\n#### Returns\n\n- `status`: Reactive authentication status (`'loading' | 'authenticated' | 'unauthenticated'`)\n- `data`: Reactive user data object\n- `token`: Reactive access token\n- `refreshToken`: Reactive refresh token\n- `loading`: Reactive loading state\n- `signUp(userData, options?)`: Function to register a new user\n- `signIn(loginData, options?)`: Function to sign in a user\n- `signOut()`: Function to sign out the current user\n- `getSession()`: Function to fetch the current user session\n- `signInWithSocial(provider, params, options?)`: Function for social authentication\n- `initiateSocialLogin(provider, options?)`: Function to start OAuth flow\n- `handleSocialCallback(provider, code, state?)`: Function to handle OAuth callback\n- `refreshAuthToken()`: Function to refresh the access token\n- `clearTokens()`: Function to clear all tokens\n\n#### Function Signatures\n\n```typescript\n// Sign up a new user\nsignUp(userData: any, options?: { callbackUrl?: string }): Promise<void>\n\n// Sign in an existing user\nsignIn(loginData: any, options?: { callbackUrl?: string }): Promise<void>\n\n// Sign in with social provider (after getting OAuth code)\nsignInWithSocial(provider: string, params: any, options?: { callbackUrl?: string }): Promise<void>\n\n// Initiate OAuth flow (redirects to provider)\ninitiateSocialLogin(provider: string, options?: {\n  callbackUrl?: string\n  clientId?: string\n  redirectUri?: string\n  scopes?: string[]\n  state?: string\n  callbackPage?: string // For server-side callback\n}): Promise<void>\n\n// Handle OAuth callback (client-side)\nhandleSocialCallback(provider: string, code: string, state?: string): Promise<void>\n```\n\n### Utility Functions\n\n#### `authResponseError(response)`\n\nExtracts error messages from API responses.\n\n## Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `isEnabled` | boolean | `true` | Enable/disable the auth module |\n| `baseUrl` | string | `'/api/auth'` | API base URL for authentication endpoints |\n| `callback` | string | `'/'` | Default redirect after successful authentication |\n| `endpoints` | object | See below | API endpoint configuration |\n| `token` | object | See below | Token configuration |\n| `social` | object | See below | Social authentication configuration |\n\n### Endpoint Configuration\n\n```js\nendpoints: {\n  signIn: { path: '/login', method: 'post' },\n  signOut: { path: '/logout', method: 'post' },\n  signUp: { path: '/register', method: 'post' },\n  getSession: { path: '/session', method: 'get' },\n  refresh: { path: '/refresh', method: 'post' },\n  google: { path: '/google', method: 'post' },\n}\n```\n\n### Token Configuration\n\n```js\ntoken: {\n  tokenPointer: '/access_token',        // Path to access token in API response\n  refreshTokenPointer: '/refresh_token', // Path to refresh token in API response\n  type: 'Bearer',                       // Token type for Authorization header\n  cookieName: 'auth.token',            // Cookie name for access token\n  headerName: 'Authorization',          // Header name for API requests\n  maxAgeInSeconds: 86400,              // Token expiration (1 day)\n  sameSiteAttribute: 'lax',            // Cookie SameSite attribute\n  cookieDomain: '',                    // Cookie domain (empty = current domain)\n  secureCookieAttribute: true,        // Use HTTPS only (true in production)\n  httpOnlyCookieAttribute: true,      // HTTP-only cookies (recommended: true)\n  refresh: {\n    refreshOnlyToken: true,            // Only send refresh token (not access token)\n    cookieName: 'auth.refresh',        // Cookie name for refresh token\n    maxAgeInSeconds: 7776000,          // Refresh token expiration (90 days)\n    requestTokenPointer: '/refresh_token', // Path to refresh token in request\n    sameSiteAttribute: 'lax',            // Cookie SameSite (strict in production)\n    secureCookieAttribute: true,        // Use HTTPS only (true in production)\n    httpOnlyCookieAttribute: true,      // HTTP-only cookies (recommended: true)\n  },\n}\n```\n\n### Social Authentication Configuration\n\n```js\nsocial: {\n  google: {\n    clientId: 'your-google-client-id.googleusercontent.com',\n    redirectUri: 'http://localhost:3000/auth/google/callback',\n    scopes: 'openid profile email'\n  }\n}\n```\n\n## Server Routes\n\nThe module automatically adds these server routes for social authentication:\n\n- `/api/auth/google/callback` - Google OAuth callback\n\n## Security Considerations\n\n- Always use HTTPS in production (`secureCookieAttribute: true`)\n- Consider using HTTP-only cookies (`httpOnlyCookieAttribute: true`)\n- Set appropriate cookie SameSite attributes\n- Validate tokens on the server side\n- Use short token expiration times with refresh tokens\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Generate type stubs\nnpm run dev:prepare\n\n# Develop with the playground\nnpm run dev\n\n# Build the module\nnpm run prepack\n\n# Run tests\nnpm run test\n```\n\n## Contributing\n\nHere’s an improved and up-to-date section for your README.md, including install instructions, sample usage for sign in, register, sign out, Google login, a modern config example, a development section, and a contribution guide. I’ll insert this content in the appropriate places and update the development/contribution sections at the end.\n\n---\n\n```markdown\n## Installation\n\n```bash\nnpm install @andychukse/nuxt-auth\n# or\nyarn add @andychukse/nuxt-auth\n# or\npnpm add @andychukse/nuxt-auth\n```\n\n## Module Setup\n\nAdd the module and configure it in your `nuxt.config.ts`:\n\n```ts\nexport default defineNuxtConfig({\n  modules: ['@andychukse/nuxt-auth'],\n  auth: {\n    isEnabled: true,\n    baseUrl: 'https://api_url/auth',\n    callback: '/',\n    endpoints: {\n      signIn: { path: '/login', method: 'post' },\n      signOut: { path: '/logout', method: 'post' },\n      signUp: { path: '/register', method: 'post' },\n      getSession: { path: '/session', method: 'get' },\n      refresh: { path: '/refresh', method: 'post' },\n      google: { path: '/google', method: 'post' },\n    },\n    token: {\n      tokenPointer: '/access_token',\n      refreshTokenPointer: '/refresh_token',\n      type: 'Bearer',\n      cookieName: 'auth.token',\n      headerName: 'Authorization',\n      maxAgeInSeconds: 86400,\n      sameSiteAttribute: 'lax',\n      cookieDomain: '',\n      secureCookieAttribute: false,\n      httpOnlyCookieAttribute: true,\n      refresh: {\n        refreshOnlyToken: true,\n        cookieName: 'auth.refresh',\n        maxAgeInSeconds: 7776000,\n        requestTokenPointer: '/refresh_token',\n        sameSiteAttribute: 'lax',            \n        secureCookieAttribute: false,   \n        httpOnlyCookieAttribute: true, \n      },\n    },\n    social: {\n      google: {\n        clientId: 'your-google-client-id.googleusercontent.com',\n        redirectUri: 'http://localhost:3000/auth/google/callback',\n        scopes: 'openid profile email'\n      }\n    },\n  },\n})\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Develop with the playground app\nnpm run dev\n\n# Build the module for production\nnpm run prepack\n\n# Run tests\nnpm run test\n```\n\n## Contributing\n\n1. Fork this repo and create your feature branch (`git checkout -b feature/my-feature`)\n2. Commit your changes (`git commit -am 'Add new feature'`)\n3. Push to the branch (`git push origin feature/my-feature`)\n4. Open a pull request\n\n- Please write clear commit messages and add tests for new features.\n- For major changes, open an issue first to discuss what you’d like to change.\n\n\n## License\n\n[MIT License](./LICENSE)\n","readmeFilename":"README.md"}