{"_id":"@onlyfansapi/auth","_rev":"14-93ba7268334e4ae935b001886b365c49","name":"@onlyfansapi/auth","dist-tags":{"latest":"2.3.1"},"versions":{"1.0.0":{"name":"@onlyfansapi/auth","version":"1.0.0","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@1.0.0","maintainers":[{"name":"onlyfansapi","email":"martin@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"eaccfc34f116977d4d16cfda938f7818a2036e03","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-1.0.0.tgz","fileCount":10,"integrity":"sha512-hs/iyd6OxQQpbJN8Zso0ed0y0rwMSsiCXzKtwBx/+Q5eI9K1Yfc5vG5Tmf2w+SLuKOOJxU54ltGlTOKnpzIONw==","signatures":[{"sig":"MEUCIQCYsZnKxkpeN0aU5D+/ohUdPy2xi2Al6yBiatNnbaVmNwIgAYT504tQtG2IFHozC9KDdYMptucuZl553JU0W7+jdbw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55702},"main":"dist/index.js","_from":"file:onlyfansapi-auth-1.0.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"onlyfansapi","email":"martin@onlyfansapi.com"},"_resolved":"/private/var/folders/fm/67vpq2696wz24gb8bz5c1klm0000gn/T/1a394332bc8141d692234a216a6d8a36/onlyfansapi-auth-1.0.0.tgz","_integrity":"sha512-hs/iyd6OxQQpbJN8Zso0ed0y0rwMSsiCXzKtwBx/+Q5eI9K1Yfc5vG5Tmf2w+SLuKOOJxU54ltGlTOKnpzIONw==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"10.9.3","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_1.0.0_1755958080039_0.4714571155072973","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@onlyfansapi/auth","version":"1.0.1","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@1.0.1","maintainers":[{"name":"onlyfansapi","email":"martin@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"868e09a5997018c5bd59ad8b9ca04bd8003b8951","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-1.0.1.tgz","fileCount":10,"integrity":"sha512-F8C34Tld6h7cx5OZcP+m8VfHJT3TOOw20DKCRZtGRl/TZzrAp2cem8Y/kTxMF1SbHMSCEJnufrxxmi+bVMdmXg==","signatures":[{"sig":"MEYCIQDh/0kvoHRpgmUBPDMg6ueYRAWiYrAEYAPgQof5pFP9agIhAJ89G7zudAd1nLMFXu1yQ8nHcnFRxHmuPxOl7+KVRvq3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55188},"main":"dist/index.js","_from":"file:onlyfansapi-auth-1.0.1.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"onlyfansapi","email":"martin@onlyfansapi.com"},"_resolved":"/private/var/folders/fm/67vpq2696wz24gb8bz5c1klm0000gn/T/d2659f756dc12dd17a22eacc8f0f14e1/onlyfansapi-auth-1.0.1.tgz","_integrity":"sha512-F8C34Tld6h7cx5OZcP+m8VfHJT3TOOw20DKCRZtGRl/TZzrAp2cem8Y/kTxMF1SbHMSCEJnufrxxmi+bVMdmXg==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"10.9.3","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_1.0.1_1755958196343_0.04823704794260819","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@onlyfansapi/auth","version":"1.0.2","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@1.0.2","maintainers":[{"name":"onlyfansapi","email":"martin@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"c7761a1305dd99cf9c1b00751865075d828b3aa3","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-1.0.2.tgz","fileCount":10,"integrity":"sha512-11rJAHW2ynbGmMh3lPIpywc+8UxZd8BLMDv77Xam+QLz805F/mMDFO4A4kM8X5bB8qSZKF//RINRP2POIzcunA==","signatures":[{"sig":"MEYCIQDx+Ka9+INqU9LhIuLpeo0GZ/VrKFlBEt9k+zZRESsZUAIhALpcQejBtd9vgfG+t3+ZyVc21galfPtw8HMg/3B/EpL1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55351},"main":"dist/index.js","_from":"file:onlyfansapi-auth-1.0.2.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"onlyfansapi","email":"martin@onlyfansapi.com"},"_resolved":"/private/var/folders/fm/67vpq2696wz24gb8bz5c1klm0000gn/T/7a438f3c28bbb563cb1156b276daa528/onlyfansapi-auth-1.0.2.tgz","_integrity":"sha512-11rJAHW2ynbGmMh3lPIpywc+8UxZd8BLMDv77Xam+QLz805F/mMDFO4A4kM8X5bB8qSZKF//RINRP2POIzcunA==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"10.9.3","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_1.0.2_1755958734619_0.3212236533033952","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@onlyfansapi/auth","version":"1.0.3","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@1.0.3","maintainers":[{"name":"onlyfansapi","email":"martin@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"b6752eaab365bf060e60357b85fff62516c2e74c","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-1.0.3.tgz","fileCount":10,"integrity":"sha512-883D8f6hM2d7KluIxgRvbk6kYeQFiGNUkoMLn/VOXKAASPwUtQNhOlrjZtTopT242Tq60DdWXonhc0jentNqYA==","signatures":[{"sig":"MEUCIQCzpX4K84yGeLhxrhwJuT8whCHIE6hoHvyH2iewEhIGMgIgU9nuvKoyWkFYH7eW86JYzbshD74GjvaQTsPeN/tfzKQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57523},"main":"dist/index.js","_from":"file:onlyfansapi-auth-1.0.3.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"onlyfansapi","email":"martin@onlyfansapi.com"},"_resolved":"/private/var/folders/fm/67vpq2696wz24gb8bz5c1klm0000gn/T/5ad42480f8367e8ae09b833c61429d25/onlyfansapi-auth-1.0.3.tgz","_integrity":"sha512-883D8f6hM2d7KluIxgRvbk6kYeQFiGNUkoMLn/VOXKAASPwUtQNhOlrjZtTopT242Tq60DdWXonhc0jentNqYA==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"10.9.3","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_1.0.3_1755961374908_0.4384899658590373","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@onlyfansapi/auth","version":"1.0.4","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@1.0.4","maintainers":[{"name":"onlyfansapi","email":"martin@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"e3df9e922c3bee414b9968283ea83f7ea5daeebc","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-1.0.4.tgz","fileCount":10,"integrity":"sha512-RX0EoKfB8mtPGvY5mxL3A9I7+ZO9xv0KdsOcfz5jFsb8gsg91P1XjOIq56pF/H+24l0yR3rz4MmoHdUt1sLASQ==","signatures":[{"sig":"MEYCIQCM2bH83+5EC5U1/mhd/Y26aQDzGtpuG9bBCQVUQP1SfAIhAJOiABtaeHlcT06Vbd3YuaDg+lo4+h+MS/2HFqEFDZ5n","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58204},"main":"dist/index.js","_from":"file:onlyfansapi-auth-1.0.4.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"onlyfansapi","email":"martin@onlyfansapi.com"},"_resolved":"/private/var/folders/fm/67vpq2696wz24gb8bz5c1klm0000gn/T/812579514eae363b6ddc73a2d1613b56/onlyfansapi-auth-1.0.4.tgz","_integrity":"sha512-RX0EoKfB8mtPGvY5mxL3A9I7+ZO9xv0KdsOcfz5jFsb8gsg91P1XjOIq56pF/H+24l0yR3rz4MmoHdUt1sLASQ==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"10.9.3","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_1.0.4_1755976764646_0.5760981877617233","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@onlyfansapi/auth","version":"2.0.0","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@2.0.0","maintainers":[{"name":"onlyfansapi","email":"martin@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"cacbdb3071a073f353d7b4dd7de0e6aaf4801be4","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-2.0.0.tgz","fileCount":10,"integrity":"sha512-yzWz5KNy+9Zn4V5FtFPegLldkWVkAV/6tXX7sytD0VQ6gw/ruRwQhaLriRYxsLOyEYCYDIpghTa+QxmbdfHbdQ==","signatures":[{"sig":"MEQCIDhRlCgrU/3sFsg4z3mfuAtfqc/NFtJhEsJ6AQgkW/NDAiBrleQYEqqnTBoKdIjX467ZRGUoMPQtKGbxlbT5Ac4C8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60369},"main":"dist/index.js","_from":"file:onlyfansapi-auth-2.0.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"onlyfansapi","email":"martin@onlyfansapi.com"},"_resolved":"/private/var/folders/fm/67vpq2696wz24gb8bz5c1klm0000gn/T/6b5a9fa4a70b3441cd39354884295a23/onlyfansapi-auth-2.0.0.tgz","_integrity":"sha512-yzWz5KNy+9Zn4V5FtFPegLldkWVkAV/6tXX7sytD0VQ6gw/ruRwQhaLriRYxsLOyEYCYDIpghTa+QxmbdfHbdQ==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"10.9.3","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_2.0.0_1756035685109_0.8739890798246581","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@onlyfansapi/auth","version":"2.0.1","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@2.0.1","maintainers":[{"name":"onlyfansapi","email":"martin@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"49f49dbb34f365397cb5ce657af711b7c14f6604","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-2.0.1.tgz","fileCount":10,"integrity":"sha512-8/W4qSQ1nhmoRKc0IRFO/Fv8uImxIN527uL093fSOutFKGCX+V6k3QUR6DPJ31LnQCnRWvXpM2f/jX9ttHGm5g==","signatures":[{"sig":"MEYCIQCFg3Sp4qV3G5HHevAn4UB9nPhCA8rrYCI0gQKwgAd2ygIhANclh3MgCGe1YeDSPX2BK4wV0Yc+54spcoKv3Oenjvof","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60370},"main":"dist/index.js","_from":"file:onlyfansapi-auth-2.0.1.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"onlyfansapi","email":"martin@onlyfansapi.com"},"_resolved":"/private/var/folders/fm/67vpq2696wz24gb8bz5c1klm0000gn/T/2d100dac7cf03f9dd39135bc9284e434/onlyfansapi-auth-2.0.1.tgz","_integrity":"sha512-8/W4qSQ1nhmoRKc0IRFO/Fv8uImxIN527uL093fSOutFKGCX+V6k3QUR6DPJ31LnQCnRWvXpM2f/jX9ttHGm5g==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"10.9.3","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_2.0.1_1756080882733_0.19910561618232103","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@onlyfansapi/auth","version":"2.0.2","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@2.0.2","maintainers":[{"name":"onlyfans-dev","email":"martin@onlyfansapi.com"},{"name":"diego_ofapi","email":"diego@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"5d644a906851c95b2d5d3a08c429cd7160a5b89a","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-2.0.2.tgz","fileCount":10,"integrity":"sha512-24zHDwtIgmS3xbd313b3kxv/MG9aroVI0aBrmO0kvgVylqIQbXG5Mv2oivW6XwuT9IGeG+Iia74F5GXWQ0lD6g==","signatures":[{"sig":"MEUCIF8j5G4ASJb573dHMMpIyxllyBBnPjKyZs20NDXuVrd4AiEA676Hl3geK+/LUN2Um1Qva1EJdaWbOCk1nj+bNNIvtHk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60372},"main":"dist/index.js","_from":"file:onlyfansapi-auth-2.0.2.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"diego_ofapi","email":"diego@onlyfansapi.com"},"_resolved":"/private/var/folders/3j/61sxsqzd1dbc2mk_wg4v5q680000gn/T/57242214968d4571a8d116742f2b21c5/onlyfansapi-auth-2.0.2.tgz","_integrity":"sha512-24zHDwtIgmS3xbd313b3kxv/MG9aroVI0aBrmO0kvgVylqIQbXG5Mv2oivW6XwuT9IGeG+Iia74F5GXWQ0lD6g==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"10.9.2","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_2.0.2_1761941605716_0.47029014656077983","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@onlyfansapi/auth","version":"2.1.0","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"OnlyFansAPI.com","email":"hello@onlyfansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@2.1.0","maintainers":[{"name":"onlyfans-dev","email":"martin@onlyfansapi.com"},{"name":"diego_ofapi","email":"diego@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/javascript#readme","bugs":{"url":"https://github.com/onlyfansapi/javascript/issues"},"dist":{"shasum":"cb7afe6bc7b32b6fab81901836151940a68bf8ee","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-2.1.0.tgz","fileCount":10,"integrity":"sha512-TP3TNgxwujMmYmBzjRpj89dd9HafCbXrBTtNJGlH+Ux4OfgrIq+oJS2IUohYQQ2f4RHybXUwPJcFegSJIOoxwA==","signatures":[{"sig":"MEQCIAHRr+duLXhXY3OH3vwVDjC3ppMaqVMfz6I2lD1i8fXkAiAUlXdsAFXH3vPu1RLKgsQHcwU+d+v+pK0JEqwZIts6hg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIGyeVdH/63B0wriBfDiAdoNkKDwX93QxD7TaZeGW9eHxAiBK/aAV5Nu5FxwBo7cT1mWFuaKZS4FHCrGkRzcPVMcz6Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63200},"main":"dist/index.js","_from":"file:onlyfansapi-auth-2.1.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist","check-types":"tsc --noEmit --rootDir ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a14bc444-5467-4095-8a04-163a74300a57"}},"_resolved":"/tmp/4af829b27750ac26a31e82ea8ca04c3b/onlyfansapi-auth-2.1.0.tgz","_integrity":"sha512-TP3TNgxwujMmYmBzjRpj89dd9HafCbXrBTtNJGlH+Ux4OfgrIq+oJS2IUohYQQ2f4RHybXUwPJcFegSJIOoxwA==","repository":{"url":"git+https://github.com/onlyfansapi/javascript.git","type":"git","directory":"packages/auth"},"_npmVersion":"11.19.0","description":"Framework agnostic library to embed OnlyFans Authentication in your app using OnlyFansAPI.com/auth","directories":{},"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_2.1.0_1790224447958_0.7299246622451276","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@onlyfansapi/auth","version":"2.2.0","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"Fans API","email":"hello@fansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@2.2.0","maintainers":[{"name":"onlyfans-dev","email":"martin@onlyfansapi.com"},{"name":"diego_ofapi","email":"diego@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/auth#readme","bugs":{"url":"https://github.com/onlyfansapi/auth/issues"},"dist":{"shasum":"6069f9b4a6954de73b0b74473cb471788bffa20e","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-2.2.0.tgz","fileCount":10,"integrity":"sha512-hMv4/uQh5/w7VHqYsfVwD4Mmi+jw30t2oBFJHBm4dqZLb+D8F0mVCp8oWay8Lr+kWZVVw0OBtqYQfqS5vpSv0w==","signatures":[{"sig":"MEUCIQDwIaIx6BBNZHrLECUvWX8LmJDrben2YnApO4uYWEPeSAIgX50IW5+XH12g4GAWjvSaUqjxSwZAgUDgNEjqnqbdRdo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIB4Sp8N+mGUoIK9+D7wWV+SNqRJtqXxFzimgCIpB7UnKAiAWkk8fTpNC6QsC4oxkJOh9Gy5kWkRqcI+lcXNRAfp1iA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69516},"main":"dist/index.js","_from":"file:onlyfansapi-auth-2.2.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist","check-types":"tsc --noEmit --rootDir ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"fa820d6a-7e0c-4784-9126-f8147cd345a4"}},"_resolved":"/tmp/0ab9ebd71df71e4e5a904099b9e9d593/onlyfansapi-auth-2.2.0.tgz","_integrity":"sha512-hMv4/uQh5/w7VHqYsfVwD4Mmi+jw30t2oBFJHBm4dqZLb+D8F0mVCp8oWay8Lr+kWZVVw0OBtqYQfqS5vpSv0w==","repository":{"url":"git+https://github.com/onlyfansapi/auth.git","type":"git","directory":"packages/auth"},"_npmVersion":"11.19.0","description":"Framework agnostic library to embed OnlyFans Authentication in your app using Fans API","directories":{},"_nodeVersion":"24.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_2.2.0_1793846864624_0.39380938943639887","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"@onlyfansapi/auth","version":"2.3.0","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"author":{"name":"Fans API","email":"hello@fansapi.com"},"license":"MIT","_id":"@onlyfansapi/auth@2.3.0","maintainers":[{"name":"onlyfans-dev","email":"martin@onlyfansapi.com"},{"name":"diego_ofapi","email":"diego@onlyfansapi.com"}],"homepage":"https://github.com/onlyfansapi/auth#readme","bugs":{"url":"https://github.com/onlyfansapi/auth/issues"},"dist":{"shasum":"2c7f69dac45040e85745dc1b3a6918f32c6a9b21","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-2.3.0.tgz","fileCount":11,"integrity":"sha512-YoWb/r4MOYa1O5DJke4jqzWNicjyJF6DMqlbojMgGOP0/O2z4OwJW6BX2pFr7bvBybvhWIkeEYkxPWnUK6vBWg==","signatures":[{"sig":"MEUCIQCGQzeNEZon+TV20+e+jW8yCfO8IGDyTM2nOKB+IykqhgIgNNmB4Kzebn8uCh8zEPKKHDV7o2mgQQbA8NkFGgtsM+0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIEiSXIdLOPSq3RB3iXKNU77F/KmaLkSnhBDu3zKZVVO+AiEAsDFyLqF+pAPFEdxiZEVL/1qWneadSU6M5cwEPN50BLU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1274936},"main":"dist/index.js","_from":"file:onlyfansapi-auth-2.3.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist","check-types":"tsc --noEmit --rootDir ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"fa820d6a-7e0c-4784-9126-f8147cd345a4"}},"_resolved":"/tmp/aafb19034848c9be4e97323751142e0f/onlyfansapi-auth-2.3.0.tgz","_integrity":"sha512-YoWb/r4MOYa1O5DJke4jqzWNicjyJF6DMqlbojMgGOP0/O2z4OwJW6BX2pFr7bvBybvhWIkeEYkxPWnUK6vBWg==","repository":{"url":"git+https://github.com/onlyfansapi/auth.git","type":"git","directory":"packages/auth"},"_npmVersion":"11.19.0","description":"Framework agnostic library to embed OnlyFans Authentication in your app using Fans API","directories":{},"_nodeVersion":"24.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_2.3.0_1794684932106_0.9277048923290455","host":"s3://npm-registry-packages-npm-production"}},"2.3.1":{"_id":"@onlyfansapi/auth@2.3.1","bugs":{"url":"https://github.com/onlyfansapi/auth/issues"},"dist":{"shasum":"881b7fa31ab375b4808b92af39527a8d2542f73e","tarball":"https://registry.npmjs.org/@onlyfansapi/auth/-/auth-2.3.1.tgz","fileCount":11,"integrity":"sha512-xSpqGFiE5aSqPJ46gNxaUWui6TzxJaBhnjxIe11H3dCdU34iimMNGlJKEctNEmlWkvIBAHuE0qKB4FG+2kO11g==","signatures":[{"sig":"MEQCICjNLu3VXNB4sVqru6YXXjxfTAP7Z1zweIRrWWDih7KxAiBLBVfwP2CcCvAbpL0AwMOL6kwUJo8/i0/q9u/A5MyDbg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFKdLYqDrMi3cuRomoz0LLoN62qXOwnqJVzplXwUpLkEAiAHrqqvh5plkxhW0PlYvpLf/ximaKB7M9PDpHUwUGkNfQ=="}],"unpackedSize":1276409},"main":"dist/index.js","name":"@onlyfansapi/auth","_from":"file:onlyfansapi-auth-2.3.1.tgz","types":"dist/index.d.ts","author":{"name":"Fans API","email":"hello@fansapi.com"},"module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"license":"MIT","scripts":{"dev":"NODE_ENV=development tsup --watch","build":"tsup","clean":"rm -rf dist","check-types":"tsc --noEmit --rootDir ."},"version":"2.3.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"fa820d6a-7e0c-4784-9126-f8147cd345a4"}},"homepage":"https://github.com/onlyfansapi/auth#readme","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"_resolved":"/tmp/49ac15452e4320bae8e02793f01c39a7/onlyfansapi-auth-2.3.1.tgz","_integrity":"sha512-xSpqGFiE5aSqPJ46gNxaUWui6TzxJaBhnjxIe11H3dCdU34iimMNGlJKEctNEmlWkvIBAHuE0qKB4FG+2kO11g==","repository":{"url":"git+https://github.com/onlyfansapi/auth.git","type":"git","directory":"packages/auth"},"_npmVersion":"11.19.0","description":"Framework agnostic library to embed OnlyFans Authentication in your app using Fans API","directories":{},"maintainers":[{"name":"onlyfans-dev","email":"martin@onlyfansapi.com"},{"name":"diego_ofapi","email":"diego@onlyfansapi.com"}],"_nodeVersion":"24.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0","@types/node":"^22.15.30","@repo/typescript-config":"0.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/auth_2.3.1_1794686986761_0.7523918682331876"}}},"time":{"created":"2025-08-23T14:07:59.967Z","modified":"2026-11-14T20:09:47.047Z","1.0.0":"2025-08-23T14:08:00.237Z","1.0.1":"2025-08-23T14:09:56.544Z","1.0.2":"2025-08-23T14:18:54.808Z","1.0.3":"2025-08-23T15:02:55.101Z","1.0.4":"2025-08-23T19:19:24.821Z","2.0.0":"2025-08-24T11:41:25.296Z","2.0.1":"2025-08-25T00:14:42.927Z","2.0.2":"2025-10-31T20:13:25.925Z","2.1.0":"2026-09-24T04:34:08.035Z","2.2.0":"2026-11-05T02:47:44.951Z","2.3.0":"2026-11-14T19:35:32.233Z","2.3.1":"2026-11-14T20:09:46.865Z"},"bugs":{"url":"https://github.com/onlyfansapi/auth/issues"},"author":{"name":"Fans API","email":"hello@fansapi.com"},"license":"MIT","homepage":"https://github.com/onlyfansapi/auth#readme","keywords":["onlyfans","api","auth","authentication","onlyfansapi","onlyfans-api","ofauth","onlyfans link embed","ofauth link embed"],"repository":{"url":"git+https://github.com/onlyfansapi/auth.git","type":"git","directory":"packages/auth"},"description":"Framework agnostic library to embed OnlyFans Authentication in your app using Fans API","maintainers":[{"name":"onlyfans-dev","email":"martin@onlyfansapi.com"},{"name":"diego_ofapi","email":"diego@onlyfansapi.com"}],"readme":"![FansAPI.com](https://cdn.jsdelivr.net/npm/@onlyfansapi/auth@2.3.1/assets/fansapi-banner.png)\n\n# FansAPI Auth\n\nLet your customers connect their OnlyFans accounts to your app. Use `@onlyfansapi/auth` when you build a CRM, AI chatbot, or another app that needs to work with customers' OnlyFans accounts through FansAPI.\n\nYour customer signs in through a hosted popup inside your app. The popup handles credentials and verification. Your app receives the connected account ID. When a session expires, use the same popup to update the credentials and reconnect the existing account.\n\nFansAPI is the product name; the npm package and exported methods keep their existing names.\n\n## Features\n\n- ⚡ **Less integration work.** One browser call opens the hosted sign-in flow.\n- 🔄 **Connect and reconnect.** Update expired credentials without creating another account record.\n- 🧩 **Works with your frontend.** Use React, Vue, or plain JavaScript.\n- 🔐 **Hosted sign-in.** Customers enter credentials and complete verification in the popup.\n- 📘 **TypeScript included.** Typed options, callbacks, and account data.\n\nThe popup adapts to the screen size and uses fade and scale animations. Customers can close it with the close button or Escape. Background scrolling stays locked while it is open.\n\n## Contents\n\n- [Features](#features)\n- [Install](#install)\n- [Connect an account](#connect-an-account)\n- [Reconnect an existing account](#reconnect-an-existing-account)\n- [Method reference](#method-reference)\n- [Options and callbacks](#options-and-callbacks)\n- [Scoped connections](#scoped-connections)\n- [Framework examples](#framework-examples)\n  - [React](#react)\n  - [Vue](#vue)\n  - [Plain HTML and JavaScript](#plain-html-and-javascript)\n- [Troubleshooting](#troubleshooting)\n- [License](#license)\n\n## Install\n\n```bash\nnpm install @onlyfansapi/auth\n# or\nyarn add @onlyfansapi/auth\n# or\npnpm add @onlyfansapi/auth\n# or\nbun add @onlyfansapi/auth\n```\n\nYou need a FansAPI API key on your server. Your server uses it to create a short-lived client session. Pass only the session token to your browser.\n\n## Connect an account\n\n### Create a session on your server\n\nAfter your app authenticates the customer, send this request from your backend:\n\n```http\nPOST https://app.fansapi.com/api/client-sessions\nAuthorization: Bearer YOUR_SERVER_API_KEY\nContent-Type: application/json\n\n{\n  \"display_name\": \"Jamie\"\n}\n```\n\nThe API returns the session token in `data.token`. Return it to your frontend as `{ \"token\": \"ofapi_cs_...\" }`. Use a response with `Cache-Control: no-store`.\n\nIn the browser example below, `/api/onlyfans/connect-session` is a route you implement in your own app. It performs that backend request. It is not a FansAPI endpoint.\n\n### Open the popup in your app\n\n```ts\nimport {\n  startOnlyFansAuthentication,\n  type AuthOptions,\n} from '@onlyfansapi/auth';\n\nexport async function connectAccount(options: AuthOptions) {\n  const response = await fetch('/api/onlyfans/connect-session', {\n    method: 'POST',\n  });\n  if (!response.ok) throw new Error('Could not create a sign-in session');\n\n  const { token } = await response.json();\n  startOnlyFansAuthentication(token, options);\n}\n```\n\nCall `connectAccount` from your Connect button and supply the [callbacks](#options-and-callbacks). Catch errors from the session request as well as handling the popup's `onError` callback. The [framework examples](#framework-examples) show both.\n\nThe customer enters their email and password, then completes any verification OnlyFans requires. When login succeeds, `onSuccess` receives `accountId` and the account details.\n\nAssociate that account ID with the customer in your database. Your save endpoint must verify that the account belongs to the connection your server authorized. Do not trust an account ID just because the browser sent it. Use the saved ID for subsequent FansAPI requests from your backend.\n\n## Reconnect an existing account\n\nWhen your backend detects an expired session, show a Reconnect button for the saved account. Keep its existing record in your database.\n\nFirst, your backend checks that the signed-in customer can manage that account. Then create a fresh client session using its FansAPI account ID:\n\n```http\nPOST https://app.fansapi.com/api/client-sessions\nAuthorization: Bearer YOUR_SERVER_API_KEY\nContent-Type: application/json\n\n{\n  \"account_id\": \"acct_XXXXXXXXXX\"\n}\n```\n\nSend only `account_id`. Do not include `display_name`, `scopes`, `proxy_country`, or other new-connection settings. Return `data.token` to the browser as `{ \"token\": \"ofapi_cs_...\" }` with `Cache-Control: no-store`.\n\n```ts\nimport {\n  updateOnlyFansCredentials,\n  type AuthOptions,\n} from '@onlyfansapi/auth';\n\nexport async function reconnectAccount(\n  recordId: string,\n  options: AuthOptions,\n) {\n  const response = await fetch(\n    `/api/onlyfans/accounts/${encodeURIComponent(recordId)}/reconnect-session`,\n    { method: 'POST' },\n  );\n  if (!response.ok) throw new Error('Could not create a reconnect session');\n\n  const { token } = await response.json();\n  updateOnlyFansCredentials(token, options);\n}\n```\n\nThis route also belongs to your app. `recordId` identifies your own saved account record. Your server checks access and resolves it to the FansAPI account ID.\n\nThe popup prefills the saved email and leaves the password empty. The customer can keep the email or edit it. An account without a saved email starts with both fields empty. They must sign in to the same OnlyFans profile.\n\nOn success, `onSuccess` returns the same `accountId`. Refresh the existing record. Its permissions, display name, and proxy settings stay the same.\n\n### Closing, retries, and expiry\n\n| Situation | What happens |\n| --- | --- |\n| The customer closes before submitting | The connection does not change. |\n| The customer submits credentials | The new credentials replace the saved values immediately. Account access pauses until login succeeds. |\n| Login fails | The submitted credentials stay saved. The customer can use Try again to correct them without deleting the account. |\n| The customer closes after submitting | Login continues. Reopen the same token to resume progress or verification. |\n| Another session tries to start login | It cannot replace an attempt already in progress. |\n| The update token is 30 minutes old | Create a fresh token for another submission or retry. An attempt already started can finish within its authentication deadline. |\n| The update succeeds | Create a fresh token for the next update. |\n| The account reaches three new attempts in a minute | A new attempt receives HTTP 429 with `Retry-After: 60`. |\n\nTo reopen a running attempt, keep its token in component memory and call `updateOnlyFansCredentials` with it again. Do not share tokens between customers or hardcode them in public configuration.\n\nThe API endpoint `POST /authenticate/{account_id}/reauthenticate` retries credentials FansAPI already has. Use this package's `updateOnlyFansCredentials` method when the customer needs to enter replacement credentials.\n\n## Method reference\n\n| Method | Purpose | Arguments |\n| --- | --- | --- |\n| [`startOnlyFansAuthentication`](#startonlyfansauthentication) | Connect a new account through the popup. | A client session token and `AuthOptions`. |\n| [`updateOnlyFansCredentials`](#updateonlyfanscredentials) | Update credentials for an existing account through the same popup. | An account-bound client session token and `AuthOptions`. |\n| [`closeOnlyFansAuthentication`](#closeonlyfansauthentication) | Close the popup. | None. |\n\n### `startOnlyFansAuthentication`\n\n```ts\nstartOnlyFansAuthentication(clientSessionToken, options);\n```\n\nCreate a new-connection session on your backend first. This method opens the hosted form in an iframe. See [Connect an account](#connect-an-account).\n\n### `updateOnlyFansCredentials`\n\n```ts\nupdateOnlyFansCredentials(clientSessionToken, options);\n```\n\nCreate the session with `account_id` on your backend first. This method reuses the existing popup. The server-issued session determines which account it can update. Browser options cannot change the account or its permissions. See [Reconnect an existing account](#reconnect-an-existing-account).\n\n### `closeOnlyFansAuthentication`\n\n```ts\nimport { closeOnlyFansAuthentication } from '@onlyfansapi/auth';\n\ncloseOnlyFansAuthentication();\n```\n\nThe customer can also close the popup with its close button or Escape. Closing does not cancel a login already submitted. It does not call `onError` or `onContinue`.\n\nAll three methods return `void`. Use callbacks for the authentication result. Opening a popup replaces any popup already open on the page.\n\n## Options and callbacks\n\nBoth opening methods accept `AuthOptions`:\n\n| Option | Required | When to use it |\n| --- | --- | --- |\n| `onSuccess(data)` | Yes | Handle a successful login. Receives `AuthSuccessData`. |\n| `onError(error)` | Yes | Display a failure reported by the hosted form. Receives `AuthFailureError`. |\n| `onContinue()` | No | Continue your app's flow after the hosted screen sends its Continue event. The popup closes before this callback runs. |\n| `baseUrl` | No | Override the hosted form origin. The production default is `https://app.fansapi.com`. |\n\n`onSuccess` does not automatically close the popup. Use `onContinue` to navigate after the customer continues, or call `closeOnlyFansAuthentication` if your app should close it immediately after success.\n\n```ts\nimport type { AuthOptions } from '@onlyfansapi/auth';\n\nconst options: AuthOptions = {\n  onSuccess: ({ accountId, username }) => {\n    console.log('Connected account:', accountId, username);\n  },\n  onError: ({ message }) => {\n    console.error(message);\n  },\n  onContinue: () => {\n    window.location.assign('/accounts');\n  },\n};\n```\n\nThe package exports these result types:\n\n```ts\ninterface AuthSuccessData {\n  accountId: string;\n  username: string;\n  scopes?: string[];\n  appName?: string;\n  onlyfansData: {\n    id: number | string;\n    username: string;\n    email: string;\n    avatar_url: string | null;\n    name: string;\n  };\n}\n\ninterface AuthFailureError {\n  message: string;\n}\n```\n\n`accountId` is the FansAPI account ID. `onlyfansData.id` is the OnlyFans profile ID. `scopes` and `appName` are present for limited-scope connections.\n\n## Scoped connections\n\nFor a new connection, your backend can request specific permissions in the client-session body:\n\n```json\n{\n  \"display_name\": \"Jamie\",\n  \"app_name\": \"My CRM\",\n  \"scopes\": [\"tracking-links.read\", \"trial-links.read\", \"smart-links.read\"]\n}\n```\n\nOpen the resulting token with `startOnlyFansAuthentication`. The hosted screen shows your app name and the requested access before sign-in.\n\n- `account.read` is always included.\n- Tracking links, trial links, and smart links support `.read`, `.write`, and `.delete` permissions.\n- Write includes read. Delete requires its own permission.\n- Read includes the feature's reports and subscriber and spender data.\n- Limited scopes require `app_name`. Unknown scopes are rejected.\n- Omitting `scopes`, or sending `[\"*\"]`, grants full access without the access disclaimer. Do not combine `*` with individual scopes.\n\nFansAPI stores these grants on the connected account and enforces them independently of the API key used for later requests. Reconnecting preserves the grants. It does not request new permissions.\n\n## Framework examples\n\nEach example requests a fresh token from `/api/onlyfans/connect-session`, the backend route described in [Connect an account](#connect-an-account). Your route returns `{ \"token\": \"ofapi_cs_...\" }`. Keep the API key on your server.\n\nOn success, save the connection through your own authenticated backend after it verifies account ownership. These examples log the result so you can see the callback data.\n\n### React\n\n```tsx\n'use client';\n\nimport { startOnlyFansAuthentication } from '@onlyfansapi/auth';\n\nexport function AuthButton() {\n  async function handleAuth() {\n    try {\n      const response = await fetch('/api/onlyfans/connect-session', {\n        method: 'POST',\n      });\n      if (!response.ok) throw new Error('Could not create a sign-in session');\n      const { token } = await response.json();\n\n      startOnlyFansAuthentication(token, {\n        onSuccess: (data) => console.log('Connected:', data),\n        onError: ({ message }) => console.error(message),\n      });\n    } catch (error) {\n      console.error('Could not open sign-in:', error);\n    }\n  }\n\n  return <button onClick={handleAuth}>Connect OnlyFans account</button>;\n}\n```\n\n### Vue\n\n```vue\n<template>\n  <button @click=\"handleAuth\">Connect OnlyFans account</button>\n</template>\n\n<script setup>\nimport { startOnlyFansAuthentication } from '@onlyfansapi/auth';\n\nasync function handleAuth() {\n  try {\n    const response = await fetch('/api/onlyfans/connect-session', {\n      method: 'POST',\n    });\n    if (!response.ok) throw new Error('Could not create a sign-in session');\n    const { token } = await response.json();\n\n    startOnlyFansAuthentication(token, {\n      onSuccess: (data) => console.log('Connected:', data),\n      onError: ({ message }) => console.error(message),\n    });\n  } catch (error) {\n    console.error('Could not open sign-in:', error);\n  }\n}\n</script>\n```\n\n### Plain HTML and JavaScript\n\nThis example works without a bundler. Serve it from your app so the session request reaches your backend. The script uses the published browser build and exposes `window.FansAPI.Auth`.\n\n```html\n<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <title>Connect an OnlyFans account</title>\n  </head>\n  <body>\n    <button id=\"connect\">Connect OnlyFans account</button>\n    <p id=\"status\" role=\"status\"></p>\n\n    <script src=\"https://cdn.jsdelivr.net/npm/@onlyfansapi/auth@2.3.0/dist/index.global.js\"></script>\n    <script>\n      const button = document.getElementById('connect');\n      const status = document.getElementById('status');\n\n      button.addEventListener('click', async () => {\n        button.disabled = true;\n        status.textContent = '';\n        try {\n          const response = await fetch('/api/onlyfans/connect-session', {\n            method: 'POST',\n          });\n          if (!response.ok) throw new Error('Could not create a sign-in session');\n          const { token } = await response.json();\n\n          window.FansAPI.Auth.startOnlyFansAuthentication(token, {\n            onSuccess: ({ username }) => {\n              status.textContent = `Connected as ${username}`;\n            },\n            onError: ({ message }) => {\n              status.textContent = message;\n            },\n          });\n        } catch (error) {\n          status.textContent = error.message;\n        } finally {\n          button.disabled = false;\n        }\n      });\n    </script>\n  </body>\n</html>\n```\n\nFor reconnecting in any of these examples, request an account-bound token from your reconnect route and call `updateOnlyFansCredentials` instead. The [reconnect guide](#reconnect-an-existing-account) includes the backend request and browser code. Browser scripts use `window.FansAPI.Auth.updateOnlyFansCredentials(token, options)`.\n\nThe browser build also exposes `closeOnlyFansAuthentication`. `window.OnlyFansAPI.Auth` remains available for existing integrations. With a bundler, plain JavaScript can use the same imports as the React and Vue examples. Call the methods only in the browser, not during server rendering.\n\n## Troubleshooting\n\n| Problem | What to check |\n| --- | --- |\n| The popup cannot load | Check your Content Security Policy. Its `frame-src` must allow `https://app.fansapi.com`. |\n| Your policy still allows only the old domain | Add the new domain, or temporarily set `baseUrl: 'https://app.onlyfansapi.com'`. Both production origins are supported. |\n| The session is invalid or expired | Request a fresh token from your backend. Do not reuse one customer's token for another customer. |\n| Reconnect opens the wrong flow | Check that your server created the session with only the selected `account_id`. The method name alone does not create an account-bound session. |\n| Closing the popup does not call your callback | Close and Escape do not emit a cancellation callback. `onContinue` handles only the hosted screen's Continue event. |\n| The session request fails before the popup opens | Catch the rejected promise from your helper. `onError` handles messages from the hosted form, not your own backend request. |\n\nKeep API keys and account-ownership checks on your server. Treat session tokens as temporary credentials. The package accepts messages only from the active iframe and an allowed origin. Set `baseUrl` only from trusted app configuration, never from customer input.\n\nRead the [authentication guide](https://docs.onlyfansapi.com/auth) and [client-session API reference](https://docs.onlyfansapi.com/api-reference/client-sessions/create-client-session) for more detail.\n\n## License\n\nMIT.\n","readmeFilename":"README.md"}