{"_id":"@remix-run/auth-middleware","_rev":"12-987f13524eec19f12d5c68cc40cf6d61","name":"@remix-run/auth-middleware","dist-tags":{"latest":"0.2.7"},"versions":{"0.0.0":{"name":"@remix-run/auth-middleware","version":"0.0.0","license":"MIT","_id":"@remix-run/auth-middleware@0.0.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"b9479a75584d830c0045d076c75c7bfb6d7fa87b","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.0.0.tgz","fileCount":2,"integrity":"sha512-NirTcZnI6NSknzVhEtQpNiVEMHSVjb111PKOSyPYbXRV33TEGg4gGX5M6demltV/H5ZzbQ7eReq6z6ORX0p3kQ==","signatures":[{"sig":"MEQCIApEU0aC66VLba2VHFmPA3K7RT9ZRw9/kGa0qDToPDZNAiBavYSxfkqFI+U3gopDjOj0DzE1Rux/5NxkAOFH1IGRew==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":477},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.9.0","description":"Placeholder package for Remix CI/OIDC setup","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.0.0_1773883798427_0.4937235113447269","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@remix-run/auth-middleware","version":"0.1.0","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.1.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"4c6edd5fc33899a9637d2aaf987a75b67bb97013","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.1.0.tgz","fileCount":27,"integrity":"sha512-QZlI4MyU8VTVI6WB4T4MWWqtbYrIUiiBG3mgdJUXjEYMBBoxVAkT/6rT3YErmhX+SVARP2zC46qzujrbYcQLCQ==","signatures":[{"sig":"MEUCIHZSXE/dKm2tbovUGtrvFTc9myRsjSY/Lb+QSgJtZqQEAiEA+E4NTxOhWqS1i4Stxl8daYtYGxmxg3dV5c2A0IZ4SsI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51529},"type":"module","_from":"file:remix-run-auth-middleware-0.1.0.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"node --disable-warning=ExperimentalWarning --test","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/3c0d2750c6c10f572fb8b1190374b268/remix-run-auth-middleware-0.1.0.tgz","_integrity":"sha512-QZlI4MyU8VTVI6WB4T4MWWqtbYrIUiiBG3mgdJUXjEYMBBoxVAkT/6rT3YErmhX+SVARP2zC46qzujrbYcQLCQ==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.9.0","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@remix-run/session":"^0.4.1","@remix-run/fetch-router":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@remix-run/cookie":"0.5.1","@remix-run/session":"0.4.1","@remix-run/fetch-router":"0.18.0","@typescript/native-preview":"7.0.0-dev.20251125.1","@remix-run/session-middleware":"0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.1.0_1774479857183_0.15375133451363632","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@remix-run/auth-middleware","version":"0.1.1","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.1.1","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"a06c8f421cb04fc0752071ff41a5b089b51e290c","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.1.1.tgz","fileCount":27,"integrity":"sha512-20oucaqUhAymi/0NkD7Nr0ONCQyNM6EZf9rlCQrpxK8TjvyRjIS0jlnvljPTnvSXy0WVMaoG+e3E/Ayq2TiToQ==","signatures":[{"sig":"MEUCIEqS/h5QWPTxsFVvxHBMxgaF/LRghY49mGreKwX3v6YvAiEA7bdvosJfwRyao4tR3kbRFtCd5yAuYP1y5JBMAi127wU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51556},"type":"module","_from":"file:remix-run-auth-middleware-0.1.1.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix-test","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/7c2a5cd5ecae96410491a45cabceff43/remix-run-auth-middleware-0.1.1.tgz","_integrity":"sha512-20oucaqUhAymi/0NkD7Nr0ONCQyNM6EZf9rlCQrpxK8TjvyRjIS0jlnvljPTnvSXy0WVMaoG+e3E/Ayq2TiToQ==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.12.1","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@remix-run/session":"^0.4.1","@remix-run/fetch-router":"^0.18.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@remix-run/test":"0.1.0","@remix-run/assert":"0.1.0","@remix-run/cookie":"0.5.1","@remix-run/session":"0.4.1","@remix-run/fetch-router":"0.18.1","@typescript/native-preview":"7.0.0-dev.20251125.1","@remix-run/session-middleware":"0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.1.1_1776904676836_0.03424836154314037","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@remix-run/auth-middleware","version":"0.1.2","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.1.2","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"99786790b629645aaa72fe974d2101cae3c66a25","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.1.2.tgz","fileCount":27,"integrity":"sha512-hXv0tCKNcwcSWAKYTTxtaKM+xiWk/U4ZL4IKlk5pHLiEaFoYykSgVOlMB59cmZuovqt74ju7YQME9MW2zhnFEA==","signatures":[{"sig":"MEUCIBKzBRxrXgnvH5tB83VSu2rBWLGt3UN1np0uil+xyEbMAiEA8hyyDhBubYUul+cQ8YSEvZjhR7Prjholrx19b7ePRvA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51598},"type":"module","_from":"file:remix-run-auth-middleware-0.1.2.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix-test","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix-test","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/9a8355680f95a760e49259cf6e7e779d/remix-run-auth-middleware-0.1.2.tgz","_integrity":"sha512-hXv0tCKNcwcSWAKYTTxtaKM+xiWk/U4ZL4IKlk5pHLiEaFoYykSgVOlMB59cmZuovqt74ju7YQME9MW2zhnFEA==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.11.0","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.14.1","dependencies":{"@remix-run/session":"^0.4.1","@remix-run/fetch-router":"^0.18.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@remix-run/test":"0.3.0","@remix-run/assert":"0.2.0","@remix-run/cookie":"0.5.1","@remix-run/session":"0.4.1","@remix-run/fetch-router":"0.18.2","@typescript/native-preview":"7.0.0-dev.20251125.1","@remix-run/session-middleware":"0.2.2"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.1.2_1777576306548_0.6096445660654108","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@remix-run/auth-middleware","version":"0.2.0","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.2.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"694f7c50b942bcd9954d8ca7620aa7b41fe11c7c","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.2.0.tgz","fileCount":27,"integrity":"sha512-e3wUbpYYny1l5or+0NUCoaohHF+ULBds4OPAEqWEcgjkzAf10i6gKL84tElK3aW5EiDTLcVIqyYHHPz0K/my1g==","signatures":[{"sig":"MEUCIQDEVDTIQl2USG8U/DWAvYeDfkImaq1JvpQIlF6W9tqyhwIgYiKy9Vte8cK6meCSuRJMyLjQetDOWCfz0E8boXuaiU0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49037},"type":"module","_from":"file:remix-run-auth-middleware-0.2.0.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix-test","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix-test","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/407fc42e10b96d1b9fd0008cdf76e55f/remix-run-auth-middleware-0.2.0.tgz","_integrity":"sha512-e3wUbpYYny1l5or+0NUCoaohHF+ULBds4OPAEqWEcgjkzAf10i6gKL84tElK3aW5EiDTLcVIqyYHHPz0K/my1g==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.12.1","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@remix-run/session":"^0.4.1","@remix-run/fetch-router":"^0.19.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@remix-run/test":"0.4.0","@remix-run/assert":"0.2.0","@remix-run/cookie":"0.5.2","@remix-run/session":"0.4.1","@remix-run/fetch-router":"0.19.0","@typescript/native-preview":"7.0.0-dev.20251125.1","@remix-run/session-middleware":"0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.2.0_1779247332744_0.1154887537958258","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@remix-run/auth-middleware","version":"0.2.1","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.2.1","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"8af445292bbcb74a99453255f810830739b42d06","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.2.1.tgz","fileCount":27,"integrity":"sha512-NdoC3wUq7ofq4B1ouox6YYyJiLl1KoOC5lT1Sl6c1n/wH6+hEoxBby1pi3WveIO/WALgDXRoDfZp9GPUQEVh+A==","signatures":[{"sig":"MEUCIAdzEfwnXOEyyWuQ7w+lQOuPB9+F7Ag9lGywNurt5Z6PAiEAiKDrZeXd4F9HLeOBnc7qVKariCcX0KH07y+eNryX/dY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49037},"type":"module","_from":"file:remix-run-auth-middleware-0.2.1.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix-test","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix-test","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/67b764ae62186ee134f98c71705c390f/remix-run-auth-middleware-0.2.1.tgz","_integrity":"sha512-NdoC3wUq7ofq4B1ouox6YYyJiLl1KoOC5lT1Sl6c1n/wH6+hEoxBby1pi3WveIO/WALgDXRoDfZp9GPUQEVh+A==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.12.1","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@remix-run/session":"^0.4.2","@remix-run/fetch-router":"^0.19.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@remix-run/test":"0.4.1","@remix-run/assert":"0.2.1","@remix-run/cookie":"0.5.3","@remix-run/session":"0.4.2","@remix-run/fetch-router":"0.19.1","@typescript/native-preview":"7.0.0-dev.20251125.1","@remix-run/session-middleware":"0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.2.1_1779308306491_0.5463425409606941","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@remix-run/auth-middleware","version":"0.2.2","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.2.2","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"591787c789cfd72bac9fa4c24b91948d2929a510","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.2.2.tgz","fileCount":27,"integrity":"sha512-uZWKwF5BOMtDOlMrI6ZvgO7ocW5/NXmX5CXZSJS4wLQkt3+Y8DSDGA+QuhuOlFV6DsYXSLMxo6DsvMaXBu9Wyg==","signatures":[{"sig":"MEUCIHZTOK/X/8rojrvakssbeDC77mD9fZyknmG4EDEUHdn2AiEAp9+ImJ3XxLJ5CRFsfKrqWQrmg5vS1ts0E2L81Io7GQc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49037},"type":"module","_from":"file:remix-run-auth-middleware-0.2.2.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix-test","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix-test","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/bf7436a54413082b4e8eaffec2290f0e/remix-run-auth-middleware-0.2.2.tgz","_integrity":"sha512-uZWKwF5BOMtDOlMrI6ZvgO7ocW5/NXmX5CXZSJS4wLQkt3+Y8DSDGA+QuhuOlFV6DsYXSLMxo6DsvMaXBu9Wyg==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.13.0","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.16.0","dependencies":{"@remix-run/session":"^0.4.2","@remix-run/fetch-router":"^0.19.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@remix-run/test":"0.4.2","@remix-run/assert":"0.2.1","@remix-run/cookie":"0.5.4","@remix-run/session":"0.4.2","@remix-run/fetch-router":"0.19.2","@typescript/native-preview":"7.0.0-dev.20251125.1","@remix-run/session-middleware":"0.3.2"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.2.2_1780078655978_0.1691883023533738","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@remix-run/auth-middleware","version":"0.2.3","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.2.3","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"f8e1dca6609169d170e02eaec555890d11599511","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.2.3.tgz","fileCount":27,"integrity":"sha512-dUt/b/Vj4dntpORbQ9bV51eWyi7DyHM7zV4EfbSGsw7jyYfwtRptqu5Y3gAW6YlGAM1jp+ahSUMSzOqb1EEKWw==","signatures":[{"sig":"MEYCIQD7EqumEAR8fB/7/WKXSJUy/7VQ5ZgPApcs8pAf3Obg6QIhAO9xyOxH+xLTG/1C37Yp9MvQyvX3sMr7kZPqNKi6GvEa","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49037},"type":"module","_from":"file:remix-run-auth-middleware-0.2.3.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix-test","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix-test","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/30fdd39469fd13ff77f28dee44d772a8/remix-run-auth-middleware-0.2.3.tgz","_integrity":"sha512-dUt/b/Vj4dntpORbQ9bV51eWyi7DyHM7zV4EfbSGsw7jyYfwtRptqu5Y3gAW6YlGAM1jp+ahSUMSzOqb1EEKWw==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.13.0","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.16.0","dependencies":{"@remix-run/session":"^0.4.2","@remix-run/fetch-router":"^0.20.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@remix-run/test":"0.5.0","@remix-run/assert":"0.3.0","@remix-run/cookie":"0.5.4","@remix-run/session":"0.4.2","@remix-run/fetch-router":"0.20.0","@typescript/native-preview":"7.0.0-dev.20251125.1","@remix-run/session-middleware":"0.3.3"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.2.3_1780683954405_0.1377470297300447","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@remix-run/auth-middleware","version":"0.2.4","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.2.4","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"9c057c98bfe4265d9878b152a67227066ddd1d6e","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.2.4.tgz","fileCount":27,"integrity":"sha512-REesK8+OiX+kVwSvwSnpEzLWxQnekTGASNU049ygfGxDh9ow/2jC5BZ445muHenkV0qcCIsSlQYiUj5dDXIAYw==","signatures":[{"sig":"MEQCICy/NvSME0HYtzqgCbT4QHLil2uFsu/ROv4F7EpaQIxCAiBw9JYpvG95EfH60T4KyvocVDK4MEjw+4jikrjjtaKJ7Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49037},"type":"module","_from":"file:remix-run-auth-middleware-0.2.4.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix-test","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix-test","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/2f0c0cdd74e6e8e9292090c74552da74/remix-run-auth-middleware-0.2.4.tgz","_integrity":"sha512-REesK8+OiX+kVwSvwSnpEzLWxQnekTGASNU049ygfGxDh9ow/2jC5BZ445muHenkV0qcCIsSlQYiUj5dDXIAYw==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.13.0","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.17.0","dependencies":{"@remix-run/session":"^0.4.2","@remix-run/fetch-router":"^0.20.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@remix-run/test":"0.5.0","@remix-run/assert":"0.3.0","@remix-run/cookie":"0.5.4","@remix-run/session":"0.4.2","@remix-run/fetch-router":"0.20.1","@typescript/native-preview":"7.0.0-dev.20251125.1","@remix-run/session-middleware":"0.3.4"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.2.4_1782932580412_0.16257710100356992","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@remix-run/auth-middleware","version":"0.2.5","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.2.5","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"ef8ed1b4c5966b5aea21fa5c50290268d8dbefae","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.2.5.tgz","fileCount":27,"integrity":"sha512-R3R+qtnnglotSiCGm60l2zLbPl9tU9E0dJwuXR7gWYcA4Pop5IqCHxXXurLPDDWaqiMF/FZIo0akwxFZ6vS9iA==","signatures":[{"sig":"MEUCIQDKTbgxyDccITRrY9P2WfqTVlEkBG9u93S6jTDLk56lqQIgQ2ULmNLjXB4FQhUCxqpKGL0G5wd6oo2DhoOxDEbL3us=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.2.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49367},"type":"module","_from":"file:remix-run-auth-middleware-0.2.5.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix test","build":"tsc -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/96f00e4a5fefa889c9699cb9aa9f53b1/remix-run-auth-middleware-0.2.5.tgz","_integrity":"sha512-R3R+qtnnglotSiCGm60l2zLbPl9tU9E0dJwuXR7gWYcA4Pop5IqCHxXXurLPDDWaqiMF/FZIo0akwxFZ6vS9iA==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.16.0","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@remix-run/session":"^0.4.2","@remix-run/fetch-router":"^0.21.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","@types/node":"^24.6.0","@remix-run/test":"0.6.0","@remix-run/assert":"0.3.0","@remix-run/cookie":"0.6.0","@remix-run/session":"0.4.2","@remix-run/fetch-router":"0.21.0","@remix-run/session-middleware":"0.4.0"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.2.5_1786666448502_0.40171640123785357","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@remix-run/auth-middleware","version":"0.2.6","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","_id":"@remix-run/auth-middleware@0.2.6","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"cf4bcfd82c78ca850a7b1f8f17580843405dee80","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.2.6.tgz","fileCount":27,"integrity":"sha512-7+UX3OUA2QFcj/N8gKjiWolk71OCZZedMZQWqMPeVJAdMcxHC9+kUWkXWijs/RPSpqhrSCwMYJaNTfd4TiRQKg==","signatures":[{"sig":"MEUCIQCqudA+L8+VnBv8QOyrtYYUuuxiO6t6ADHhWdyXmlcLBAIgQt76UYMj5dMnGmFlLgI0D7RlFDcfDE2Okh6AYI8TcCE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.2.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49367},"type":"module","_from":"file:/tmp/remix-publish-auth-middleware-2SFoK3/remix-run-auth-middleware-0.2.6.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"test":"remix test","build":"tsc -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"_resolved":"/tmp/remix-publish-auth-middleware-2SFoK3/remix-run-auth-middleware-0.2.6.tgz","_integrity":"sha512-7+UX3OUA2QFcj/N8gKjiWolk71OCZZedMZQWqMPeVJAdMcxHC9+kUWkXWijs/RPSpqhrSCwMYJaNTfd4TiRQKg==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.19.0","description":"Pluggable authentication middleware for Remix","directories":{},"_nodeVersion":"24.20.0","dependencies":{"@remix-run/session":"^0.4.2","@remix-run/fetch-router":"^0.22.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","@types/node":"^24.6.0","@remix-run/test":"0.6.0","@remix-run/assert":"0.3.0","@remix-run/cookie":"0.6.0","@remix-run/session":"0.4.2","@remix-run/fetch-router":"0.22.0","@remix-run/session-middleware":"0.4.1"},"_npmOperationalInternal":{"tmp":"tmp/auth-middleware_0.2.6_1788908563331_0.709842133768134","host":"s3://npm-registry-packages-npm-production"}},"0.2.7":{"_id":"@remix-run/auth-middleware@0.2.7","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"c9ab1b5e31347329896783e54d0b0909f5e3277a","tarball":"https://registry.npmjs.org/@remix-run/auth-middleware/-/auth-middleware-0.2.7.tgz","fileCount":27,"integrity":"sha512-Vx5hPxAABCZyOoSbs0uVYG9GPW2jAgTdgfLlNgoaXt373SPVuoAWO0HwNjv9VtapU1VdB996KNaEsBbmKS2c1g==","signatures":[{"sig":"MEUCIHLgFYElGnMcrjlQHMaYas7yNyx6dpGmYKPNx427JwoMAiEAj8ItSCfDEQCU12AcyUuHy5XzfEuJxa77kDe3n+YignA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICo+UW32Ik++LmRxwRS6FWW92O5dFw1o9RD7JgXlkq+ZAiEA4Og+JCodUvpBhExudzSa3dg3sw6vhBxuesAQ+11yay4="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fauth-middleware@0.2.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49367},"name":"@remix-run/auth-middleware","type":"module","_from":"file:/tmp/remix-publish-auth-middleware-1rpxGL/remix-run-auth-middleware-0.2.7.tgz","author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"license":"MIT","scripts":{"test":"remix test","build":"tsc -p tsconfig.build.json","clean":"git clean -fdX","test:bun":"bun x --bun remix test","typecheck":"tsc --noEmit"},"version":"0.2.7","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c4e84434-88ac-4a1f-baaa-a617780a2ee0"}},"homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"_resolved":"/tmp/remix-publish-auth-middleware-1rpxGL/remix-run-auth-middleware-0.2.7.tgz","_integrity":"sha512-Vx5hPxAABCZyOoSbs0uVYG9GPW2jAgTdgfLlNgoaXt373SPVuoAWO0HwNjv9VtapU1VdB996KNaEsBbmKS2c1g==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"_npmVersion":"11.19.0","description":"Pluggable authentication middleware for Remix","directories":{},"maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"_nodeVersion":"24.20.0","dependencies":{"@remix-run/session":"^0.4.2","@remix-run/fetch-router":"^0.22.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","@types/node":"^24.6.0","@remix-run/test":"0.6.1","@remix-run/assert":"0.3.0","@remix-run/cookie":"0.7.0","@remix-run/session":"0.4.2","@remix-run/fetch-router":"0.22.1","@remix-run/session-middleware":"0.5.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/auth-middleware_0.2.7_1789770842238_0.9698479366839008"}}},"time":{"created":"2026-03-19T01:29:58.371Z","modified":"2026-09-18T22:34:02.722Z","0.0.0":"2026-03-19T01:29:58.592Z","0.1.0":"2026-03-25T23:04:17.336Z","0.1.1":"2026-04-23T00:37:56.969Z","0.1.2":"2026-04-30T19:11:46.724Z","0.2.0":"2026-05-20T03:22:12.881Z","0.2.1":"2026-05-20T20:18:26.653Z","0.2.2":"2026-05-29T18:17:36.124Z","0.2.3":"2026-06-05T18:25:54.541Z","0.2.4":"2026-07-01T19:03:00.541Z","0.2.5":"2026-08-14T00:14:08.702Z","0.2.6":"2026-09-08T23:02:43.461Z","0.2.7":"2026-09-18T22:34:02.313Z"},"bugs":{"url":"https://github.com/remix-run/remix/issues"},"author":{"name":"Michael Jackson","email":"mjijackson@gmail.com"},"license":"MIT","homepage":"https://github.com/remix-run/remix/tree/main/packages/auth-middleware#readme","keywords":["fetch","router","middleware","auth","authentication","bearer","api-key","session"],"repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/auth-middleware"},"description":"Pluggable authentication middleware for Remix","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"readme":"# auth-middleware\n\nRequest-time authentication and route protection for Remix. Use this package to resolve identity into `context.auth` from sessions, bearer tokens, API keys, or your own schemes. Pair it with [`remix/auth`](https://github.com/remix-run/remix/tree/main/packages/auth) when you need browser login routes that call `verifyCredentials()` or `finishExternalAuth()`, then rotate the session id with `completeAuth()` before writing the auth record.\n\n## Features\n\n- Request auth resolution without mutating request objects\n- Route protection with `requireAuth()` and configurable failure behavior\n- Built-in auth schemes for sessions, bearer tokens, and API keys\n- Ordered fallback across multiple auth schemes\n- Public and private route support with the same resolved auth state\n- Read auth state with `context.auth` (or `context.get(Auth)`)\n- Designed to pair with browser login flows that persist session auth records earlier in the request lifecycle\n\n## Installation\n\n```sh\nnpm i remix\n```\n\n## Usage\n\nThe following example shows the request-time half of a session-backed browser login flow:\n\n- another part of the app has already called `completeAuth()` and written `{ userId }` into the returned session\n- `remix/middleware/auth` reads that value, resolves the current user, and protects the dashboard route\n\n```ts\nimport { auth, createSessionAuthScheme, requireAuth } from 'remix/middleware/auth'\nimport { createRouter } from 'remix/router'\nimport { route } from 'remix/routes'\nimport { session } from 'remix/middleware/session'\n\nlet routes = route({\n  app: {\n    dashboard: '/dashboard',\n  },\n})\n\ntype User = { id: string; email: string }\n\nlet router = createRouter({\n  middleware: [\n    session(sessionCookie, sessionStorage),\n    auth({\n      schemes: [\n        createSessionAuthScheme<User, { userId: string }>({\n          read(session) {\n            return session.get('auth') as { userId: string } | null\n          },\n          verify(value) {\n            return users.getById(value.userId)\n          },\n          invalidate(session) {\n            session.unset('auth')\n          },\n        }),\n      ],\n    }),\n  ],\n})\n\nrouter.get(routes.app.dashboard, {\n  middleware: [requireAuth<User>()],\n  handler(context) {\n    let auth = context.auth\n    if (!auth.ok) {\n      return new Response('Unauthorized', { status: 401 })\n    }\n\n    return Response.json({\n      id: auth.identity.id,\n      email: auth.identity.email,\n      method: auth.method,\n    })\n  },\n})\n```\n\nIn this example, `createSessionAuthScheme()` turns a persisted session auth record back into request auth state, `auth()` stores that state at `context.auth` (or `context.get(Auth)`), and `requireAuth()` rejects anonymous requests.\n\nIf you need to create the login route, start an OAuth redirect, finish a provider callback, or write the session auth record in the first place, use [`remix/auth`](https://github.com/remix-run/remix/tree/main/packages/auth):\n\n- `verifyCredentials()` for direct credentials flows\n- `startExternalAuth()` and `finishExternalAuth()` for OAuth and OIDC flows\n- `completeAuth()` to rotate the session id before writing the auth record that this package reads later\n\n## Route Protection\n\nThis package includes two middlewares:\n\n- `auth()` to resolve auth state and store it in `context.auth` (or `context.get(Auth)`)\n- `requireAuth()` to reject requests that aren't authenticated\n\nThat separation is intentional so the same auth resolution can support public routes, API routes, and browser routes with different failure behavior.\n\n`auth()` resolves auth state and stores either `{ ok: true, identity, method }` or `{ ok: false, error? }` in `context.auth`.\n\nUse `requireAuth()` after `auth()` when a route must be authenticated. If `auth()` did not run first, `requireAuth()` throws. Otherwise it returns `401 Unauthorized` by default, or you can replace that with `onFailure(context, auth)` to return JSON, redirects, or any other custom response.\n\nHandlers whose context contract includes `auth()` and `requireAuth<Identity>()` can read `context.auth.identity` without a manual lookup or cast. You can also use `context.get(Auth)`.\n\nAuth challenges are forwarded to `WWW-Authenticate` automatically when the auth failure included a `challenge`, so clients that honor those challenges can react without custom header handling.\n\n## Auth Schemes\n\nAn `AuthScheme` is any object with a `name` and an `authenticate(context)` method. The `auth()` middleware tries each scheme in order until one returns a success or failure result. If no scheme returns success or failure, the request is treated as anonymous.\n\nThis package ships with three built-in auth schemes:\n\n- `createBearerTokenAuthScheme()` for bearer tokens in the [HTTP `Authorization: Bearer <token>` header](https://datatracker.ietf.org/doc/html/rfc6750#section-2.1)\n- `createAPIAuthScheme()` for API keys in a custom request header\n- `createSessionAuthScheme()` for session-backed auth loaded by [a `session()` middleware](https://github.com/remix-run/remix/tree/main/packages/session-middleware)\n\n## Custom Auth Schemes\n\nIf none of the built-in auth schemes match your environment, you can create your own auth scheme easily. A custom scheme usually wraps one auth mechanism behind a small `create*` factory function and returns an `AuthScheme`. For example, apps behind a trusted access proxy can authenticate requests from forwarded identity headers instead of sessions or bearer tokens.\n\n```ts\nimport type { RequestContext } from 'remix/router'\nimport type { AuthScheme } from 'remix/middleware/auth'\n\ntype User = {\n  id: string\n  role: 'admin' | 'user'\n}\n\nfunction createTrustedProxyAuthScheme(): AuthScheme<User> {\n  return {\n    name: 'trusted-proxy',\n    async authenticate(context: RequestContext) {\n      let email = context.headers.get('X-Forwarded-Email')\n\n      if (email == null) {\n        return\n      }\n\n      let user = await users.getByEmail(email)\n\n      if (user == null) {\n        return {\n          status: 'failure',\n          code: 'invalid_credentials',\n          message: 'Unknown forwarded user',\n        }\n      }\n\n      return {\n        status: 'success',\n        identity: user,\n      }\n    },\n  }\n}\n```\n\nOnly use a scheme like this when the app is reachable exclusively through infrastructure you trust to set the headers you rely on. In this case, the `X-Forwarded-Email` header.\n\n`authenticate(context)` can return:\n\n- `null`, `undefined`, or no return value to skip this scheme\n- `{ status: 'success', identity }` to authenticate the request\n- `{ status: 'failure', code?, message?, challenge? }` to stop with an auth error\n\nThe scheme `name` becomes `auth.method` when authentication succeeds.\n\n## Simple Auth Cookies\n\nIf your app already has an auth cookie and you do not need a session-backed identity lookup, you can use a small custom auth scheme and still rely on `requireAuth()` for route protection.\n\n```ts\nimport { auth, requireAuth } from 'remix/middleware/auth'\nimport type { AuthScheme } from 'remix/middleware/auth'\nimport { createCookie } from 'remix/cookie'\nimport { createRouter } from 'remix/router'\nimport { redirect } from 'remix/response/redirect'\n\nlet authCookie = createCookie('__auth', {\n  httpOnly: true,\n  sameSite: 'lax',\n  path: '/',\n})\n\nlet authCookieScheme: AuthScheme<'demo-user'> = {\n  name: 'auth-cookie',\n  async authenticate(context) {\n    let value = await authCookie.parse(context.headers.get('Cookie'))\n    if (value !== '1') {\n      return\n    }\n\n    return {\n      status: 'success',\n      identity: 'demo-user',\n    }\n  },\n}\n\nlet requireAuthCookie = requireAuth<'demo-user'>({\n  onFailure(context) {\n    let isFrameRequest = context.request.headers.get('X-Remix-Frame') === 'true'\n    if (isFrameRequest) {\n      return new Response('<p>Not authorized</p>', {\n        status: 401,\n        headers: {\n          'Content-Type': 'text/html; charset=utf-8',\n        },\n      })\n    }\n\n    return redirect('/login')\n  },\n})\n\nlet router = createRouter({\n  middleware: [\n    auth({\n      schemes: [authCookieScheme],\n    }),\n  ],\n})\n\nrouter.get('/dashboard', {\n  middleware: [requireAuthCookie],\n  handler() {\n    return new Response('ok')\n  },\n})\n```\n\nThis pattern keeps the auth check app-owned. Use [`remix/middleware/session`](https://github.com/remix-run/remix/tree/main/packages/session-middleware) and [`remix/auth`](https://github.com/remix-run/remix/tree/main/packages/auth) when you need server-managed session data, credential verification helpers, or OAuth/OIDC flows.\n\n## Related Packages\n\n- [`auth`](https://github.com/remix-run/remix/tree/main/packages/auth) - Browser auth primitives for credentials, OAuth, and OIDC flows\n- [`fetch-router`](https://github.com/remix-run/remix/tree/main/packages/fetch-router) - Router and middleware runtime\n- [`response`](https://github.com/remix-run/remix/tree/main/packages/response) - Response helpers like redirects\n\n## Related Work\n\n- [HTTP Authentication Framework](https://datatracker.ietf.org/doc/html/rfc7235)\n- [OAuth 2.0 Bearer Token Usage](https://datatracker.ietf.org/doc/html/rfc6750)\n\n## License\n\nSee [LICENSE](https://github.com/remix-run/remix/blob/main/LICENSE)\n","readmeFilename":"README.md"}