{"_id":"@abhiraj_patil/authifyer-sdk","_rev":"14-2f951574123bbbf7dd17738042e67bce","name":"@abhiraj_patil/authifyer-sdk","dist-tags":{"latest":"1.0.19"},"versions":{"1.0.5":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.5","keywords":[],"author":"","license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.5","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"dist":{"shasum":"b57fd05e9ff1dfacfafabc307b70ee05e3688944","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.5.tgz","fileCount":19,"integrity":"sha512-uf6ECK2K3VkZnQUazzePL0/AEUIpvf7wp8Y5s/p42eF0fDP6P3lS6M3S9RAKoC1rbFnQ0+4cMU+SVrFRZdTv4Q==","signatures":[{"sig":"MEUCIQCmXsaqhH5k9S0FSp+acv4WyKI7GrWhUYFw1TNa44dfVQIgOXvAifCNByxS6yLo3EvQegVoI4Q9vrl+D5U+X8MCaeM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187492},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"d6b2218cb823c4d6aa2edc9570265c48ad6e3553","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"_npmVersion":"10.9.0","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.5_1772252488891_0.4174062149144828","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.6","keywords":[],"author":"","license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.6","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"dist":{"shasum":"ae886e41c3c25d7c9c72a627050344be8de5f2e9","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.6.tgz","fileCount":21,"integrity":"sha512-Pt6Zh/9NvfkBFmGVuGXW2eqV3aKGMJvNtLboWynmQTwgcPCfvTIRzUTH10gxKWrLNFE1/tqYKtOx7xYndwHxbA==","signatures":[{"sig":"MEYCIQCJ259fpwKs8ztlBUR2WzM8vHbrvZI3oW1BQjCWwiUN/AIhAOwWS8SzvIpShp1lkOfW0SnDTtNS1X9a1zMfQwrtia7b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":251651},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"d6b2218cb823c4d6aa2edc9570265c48ad6e3553","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"_npmVersion":"10.9.0","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.6_1772450360423_0.8021359327069932","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.7","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.7","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"56e9dca59fd4a92db5b166f50dad9f73cd26b717","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.7.tgz","fileCount":5,"integrity":"sha512-qa/1PfpikYO1TCtO09moZ8y7b88ppLwS/q/l6LhiDYy0oibLZM1K10bcrNfclhv1QsY/NVi1my6J2t7hT2vPlA==","signatures":[{"sig":"MEUCIHKihZS9aRrkZeDzNILVoyoMy/6aEJdyUMJk/UzZExhrAiEAhaL2PYJOGYIUdVYzPv9Ep/Bp+chEETLMiXj1E2FOB2I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199412},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"d6b2218cb823c4d6aa2edc9570265c48ad6e3553","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.7_1772451669998_0.21601862224831336","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.8","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.8","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"35d770ccd7fdbb047295992e8032f370739475a9","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.8.tgz","fileCount":5,"integrity":"sha512-3Prx21pW1nXFYexLsPJ4m8R1m37CqLZMUDk1Lt/vDWKV9GWI1a7gDRIui7vtki5oEfOnZad78iR5afyq+1QGAQ==","signatures":[{"sig":"MEUCIQDdwxmvp/XetW7rhqrA8t6lP9kgNpjttQDUx+ssi+/fRQIgBAiIip4PxLELiDvK64DgYbQahkGGY0TWlGPciV2u3MI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199412},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"d6b2218cb823c4d6aa2edc9570265c48ad6e3553","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.8_1772525580686_0.8285652385412396","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.9","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.9","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"396efb13169d71cc4477c6b8866bbb922ff3419f","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.9.tgz","fileCount":5,"integrity":"sha512-0b2QkK2IZKJ6UfA2uwi2KB8cy/gkOT0fSXZWRYVQom9ToxRZo+NDigzSsPj2Yv4CrKgnq8dpCn2fw67yfFUGrg==","signatures":[{"sig":"MEYCIQDnv974SR3/XszSTmHQLz4CuOfquyXR1MKmpOba7SlTDwIhANgI5FIb73GzCioSlDv4EAhgpD619Aw4f3MAqO8yNewO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199412},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"d6b2218cb823c4d6aa2edc9570265c48ad6e3553","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.9_1772532077458_0.06466013390905578","host":"s3://npm-registry-packages-npm-production"}},"1.0.10":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.10","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.10","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"bd5a0dcb1ca49c7253443fecc6c7595c49d4d8ac","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.10.tgz","fileCount":5,"integrity":"sha512-GWjq27mNUCsw14ebj4/gEv218cHf2S8BXHlQKm7zl7TGPyRoIbNHI5M96oXAiaEUDTlbiFSlrDvN+Sf00kHDHg==","signatures":[{"sig":"MEYCIQDE5i8Fypza3eJTNAsRO5g9NIM7F78aZSubHQ/969uV/QIhAO+0xtN/pLtDbwZExaBYjpiBenUeMwL7vfgr9iEKpGMG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199620},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"d6b2218cb823c4d6aa2edc9570265c48ad6e3553","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.10_1772534654294_0.4993853363915579","host":"s3://npm-registry-packages-npm-production"}},"1.0.11":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.11","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.11","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"72247a583e7b003d1832bbf98003d3054f19c6b4","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.11.tgz","fileCount":5,"integrity":"sha512-fBeE7jBW28PaOn+1NvSDCOdLqh7Xzc5IdOFPQkaWkOInU8GcNl3mPo9Xi2VN+nz/ilLmHRWRc5FfEYpIMYarvg==","signatures":[{"sig":"MEUCIG3CRKi33oDZgLhqW1Jtp0KhFQlZiIVvnye8kBj+73wIAiEAwzq1rRQnM5mcSYYz3vlQ/1p9pcH4QjchwDwu4dB/beQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199529},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"d6b2218cb823c4d6aa2edc9570265c48ad6e3553","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.11_1772538276379_0.6321476623863647","host":"s3://npm-registry-packages-npm-production"}},"1.0.12":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.12","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.12","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"78a6b85437698e4950f908088b6c054c9396aef8","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.12.tgz","fileCount":5,"integrity":"sha512-HuSrem5Gj0mr9G8joVFa5A+BmhqNr4+YIJU3QrGgouOMk6KDfc+i7gRWDG0JYeSktwW5anbdLFpSSZHzrHTxRw==","signatures":[{"sig":"MEYCIQDNM1FBqgZYOL2j0p8CiDF0drMG3f0CJCp2gj1oTq69aAIhAIoFFCLMAMzMm24sXf8t1byRqsGAuUmfb0TU7tZK9y03","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199529},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"c17cc7eedda94f61f494182ea7514707e1ac3af6","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.12_1772642763606_0.40301180643401135","host":"s3://npm-registry-packages-npm-production"}},"1.0.14":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.14","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.14","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"b2b3025c35de256cf72c5d377d678d9e560319a3","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.14.tgz","fileCount":5,"integrity":"sha512-U2ma2bbHJ7kFbfiPVeb/bAYPltoI5z/RLz0ZwZQsAF8oH05NQO9fd7yxkgWMytlP1M4V6G6XivSdHTFG9F+unQ==","signatures":[{"sig":"MEUCICnip0KuZ1MUzmTF+OO1HsfKTQAd9ih8X4gBlN82CmsXAiEArlDMCiGhRVuWrZjRSZOP8fWjDFC41vsP4IsUQrzZTFY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199529},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"c17cc7eedda94f61f494182ea7514707e1ac3af6","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.14_1772682179133_0.66068547178541","host":"s3://npm-registry-packages-npm-production"}},"1.0.15":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.15","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.15","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"d9cc6c65c58e94b9546d2ed934dea7d3437f651a","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.15.tgz","fileCount":5,"integrity":"sha512-TVv0Z95oBKIfSubhe6MDcHdAjGYnWnxY21aNZ6mbicKhpzqpueHlPWuMlQ2AeAkf+EvkJcoeivGiNkImVNyBig==","signatures":[{"sig":"MEUCIQDQ2jMjH4AbvZXV159Tt/lh8AtxTZ08zsTKGCqNAEJ+IwIgbTjE0ENYtBoWSiv6ylel8+G8TrOVtPX21oRVENWWZ/Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":200175},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"5eb067380e66e8fc70caa5d7169ea5a1b281427b","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.15_1772775918097_0.9907353476229777","host":"s3://npm-registry-packages-npm-production"}},"1.0.16":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.16","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.16","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"fd96ffc2e303251c3eda12606f50e4e17a961fa3","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.16.tgz","fileCount":5,"integrity":"sha512-2Sgdt3VGS9/RDsXYQUZd5QG3hmJd1q7DUvElnijeqSYKbgr/FSN6SzBqSi/xysJ65aSD/SpOe9/k4DCR1mZxlA==","signatures":[{"sig":"MEUCIAP/zZzOD1bfmtXy1fn7HIknK+6cIsyEO7rHsr+Zrtl4AiEA125k0MmqypmmNO2qeCm2vI0F6Tg6XjPoL/Ma7xMR7as=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":200894},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"40d9cc9f680073d47b8bc84abd2a3a519cc0504e","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.16_1772949998656_0.9201035394343258","host":"s3://npm-registry-packages-npm-production"}},"1.0.17":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.17","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.17","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"c9e8f6479414bbe115e9ff1da66d566ece4acf9a","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.17.tgz","fileCount":5,"integrity":"sha512-AEoS+Gza9cCIai0WloFS0ldVfX39WVEej8w0g2PboE1cQuo0F1LId8Uj7KxUV5FtTHnIOnBHDOPpXugvgSZj1g==","signatures":[{"sig":"MEUCID3Mqle0GDEOH536dipCi/BfwzkfKSHsJt49AX/TjET9AiEAsLrIX8n1Kv2EhB5maHgOM1REKJeufLUp+80U1pbRbHA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":200309},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"40d9cc9f680073d47b8bc84abd2a3a519cc0504e","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.0","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.17_1772974130380_0.5791152321567248","host":"s3://npm-registry-packages-npm-production"}},"1.0.18":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.18","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","_id":"@abhiraj_patil/authifyer-sdk@1.0.18","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"dist":{"shasum":"c1f268bb3d48ae9358324edb939e203de74af507","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.18.tgz","fileCount":5,"integrity":"sha512-nvUH/Vf5+97mvigUwKFdDBL1KCgo+BCWpr3aWYymzIyX1KoTdZ3IiAdX7b+YaiQToI8u2xjU+QSLEAtwLLjDdQ==","signatures":[{"sig":"MEUCIQCpLiaxP8h4SJURIFWxh4E/R2+d2SN/HqUNjLOc5tapswIgAUbVORjSSzVB6xoKmnEPJqcIMNUgEeQIO2eMAUqCJ48=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":200757},"main":"dist/authifyer-sdk.umd.js","types":"dist/index.d.ts","module":"dist/authifyer-sdk.es.js","gitHead":"40d9cc9f680073d47b8bc84abd2a3a519cc0504e","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"repository":{"url":"git+https://github.com/abhiraj-a/global-auth-hub.git","type":"git"},"_npmVersion":"10.9.7","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","directories":{},"_nodeVersion":"22.22.2","dependencies":{"axios":"^1.13.5","react":"^19.2.4","react-dom":"^19.2.4","jwt-decode":"^4.0.0","typescript":"^5.9.3"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.1","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0"},"_npmOperationalInternal":{"tmp":"tmp/authifyer-sdk_1.0.18_1776253458047_0.62427005679352","host":"s3://npm-registry-packages-npm-production"}},"1.0.19":{"name":"@abhiraj_patil/authifyer-sdk","version":"1.0.19","main":"dist/authifyer-sdk.umd.js","module":"dist/authifyer-sdk.es.js","types":"dist/index.d.ts","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"author":{"name":"Abhiraj Patil"},"license":"ISC","description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","repository":{"type":"git","url":"git+https://github.com/abhiraj-a/global-auth-hub.git"},"dependencies":{"axios":"^1.13.5","jwt-decode":"^4.0.0","react":"^19.2.4","react-dom":"^19.2.4","typescript":"^5.9.3"},"devDependencies":{"@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.7.0","vite":"^6.4.1"},"_id":"@abhiraj_patil/authifyer-sdk@1.0.19","gitHead":"40d9cc9f680073d47b8bc84abd2a3a519cc0504e","bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-J5KxxAx77ku9t/T4PTxyk4Rb1NjJtuo/QNJvhl7TQs0kGCCU7xzAMQjgbMfOiUcMKCTfHSw2iIeoIvyE7twO7w==","shasum":"cd80d9740b56200c52e93ab72cf7708df632a710","tarball":"https://registry.npmjs.org/@abhiraj_patil/authifyer-sdk/-/authifyer-sdk-1.0.19.tgz","fileCount":5,"unpackedSize":200947,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID5T/v6gxz/WCro1gvFkELNi/VFujy1kUxNTLWicqk4gAiAeMsIm+TJduMOiLzmOtNl3bWUQIUMnWFY3HHlKjU5mZQ=="}]},"_npmUser":{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"},"directories":{},"maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/authifyer-sdk_1.0.19_1776254620944_0.9660353310572134"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-28T04:21:28.729Z","modified":"2026-04-15T12:03:41.248Z","1.0.5":"2026-02-28T04:21:29.169Z","1.0.6":"2026-03-02T11:19:20.568Z","1.0.7":"2026-03-02T11:41:10.148Z","1.0.8":"2026-03-03T08:13:00.831Z","1.0.9":"2026-03-03T10:01:17.630Z","1.0.10":"2026-03-03T10:44:14.569Z","1.0.11":"2026-03-03T11:44:36.539Z","1.0.12":"2026-03-04T16:46:03.773Z","1.0.14":"2026-03-05T03:42:59.268Z","1.0.15":"2026-03-06T05:45:18.254Z","1.0.16":"2026-03-08T06:06:38.836Z","1.0.17":"2026-03-08T12:48:50.530Z","1.0.18":"2026-04-15T11:44:18.196Z","1.0.19":"2026-04-15T12:03:41.156Z"},"bugs":{"url":"https://github.com/abhiraj-a/global-auth-hub/issues"},"author":{"name":"Abhiraj Patil"},"license":"ISC","homepage":"https://github.com/abhiraj-a/global-auth-hub#readme","keywords":["auth","authentication","react","oauth","google","github","login","signup","jwt","session","sdk"],"repository":{"type":"git","url":"git+https://github.com/abhiraj-a/global-auth-hub.git"},"description":"Drop-in authentication SDK for React — OAuth, Email/Password, OTP verification, session management & pre-built UI components.","maintainers":[{"name":"abhiraj_patil","email":"abhirajp0608@gmail.com"}],"readme":"<p align=\"center\">\r\n  <h1 align=\"center\">@abhiraj_patil/authifyer-sdk</h1>\r\n  <p align=\"center\">\r\n    A drop-in authentication SDK for React applications. Includes OAuth, Email/Password, OTP verification, session management, and pre-built UI components.\r\n  </p>\r\n</p>\r\n\r\n<p align=\"center\">\r\n  <a href=\"https://www.npmjs.com/package/@abhiraj_patil/authifyer-sdk\"><img src=\"https://img.shields.io/npm/v/@abhiraj_patil/authifyer-sdk.svg\" alt=\"npm version\" /></a>\r\n  <img src=\"https://img.shields.io/badge/license-ISC-blue.svg\" alt=\"license\" />\r\n</p>\r\n\r\n---\r\n\r\n## Features\r\n\r\n- **Email/Password Authentication**: Sign up, sign in, and OTP email verification out of the box.\r\n- **OAuth Login**: OAuth login with automatic token handling.\r\n- **Pre-built UI Components**: Ready-to-use `<SignIn />`, `<SignUp />`, `<UserButton />`, and `<UserProfile />` components.\r\n- **Automatic Session Management**: JWT access tokens with silent refresh and long-lived refresh tokens.\r\n- **React Hooks**: `useAuth()`, `useUser()`, `useSession()`, and `useAuthifyer()` for full control.\r\n- **Zero Config**: Works with Vite, Next.js, and Create React App.\r\n\r\n---\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @abhiraj_patil/authifyer-sdk\r\n```\r\n\r\n**Peer dependencies** (if not already in your project):\r\n\r\n```bash\r\nnpm install react react-dom\r\n```\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n### 1. Get Your Publishable Key\r\n\r\nSign up at the [Authifyer Dashboard](https://authifyer-backend.onrender.com), create a project, and copy your **Publishable Key**.\r\n\r\n### 2. Add the Provider\r\n\r\nWrap your application with `<AuthifyerProvider>`:\r\n\r\n```tsx\r\n// main.tsx or App.tsx\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom/client';\r\nimport { AuthifyerProvider } from '@abhiraj_patil/authifyer-sdk';\r\nimport App from './App';\r\n\r\nReactDOM.createRoot(document.getElementById('root')!).render(\r\n  <AuthifyerProvider publishableKey=\"pk_your_publishable_key_here\">\r\n    <App />\r\n  </AuthifyerProvider>\r\n);\r\n```\r\n\r\n### 3. Add Sign In / Sign Up\r\n\r\n```tsx\r\nimport { SignIn, SignUp, useUser } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction App() {\r\n  const { user, isSignedIn } = useUser();\r\n\r\n  if (!isSignedIn) {\r\n    return <SignIn />;\r\n    // or <SignUp /> for registration\r\n  }\r\n\r\n  return <h1>Welcome, {user?.name}!</h1>;\r\n}\r\n```\r\n\r\n---\r\n\r\n## Configuration\r\n\r\n### AuthifyerProvider Props\r\n\r\n| Prop | Type | Required | Description |\r\n|------|------|----------|-------------|\r\n| `publishableKey` | `string` | No* | Your project's publishable key |\r\n| `backendUrl` | `string` | No | Custom backend URL (for self-hosted deployments) |\r\n| `config` | `ProjectConfig` | No | Override project configuration (useful for testing) |\r\n| `children` | `ReactNode` | Yes | Your application tree |\r\n\r\n> **\\*** If not passed as a prop, the SDK will automatically read from environment variables:\r\n> - **Vite**: `VITE_AUTHIFYER_PUBLISHABLE_KEY`\r\n> - **Next.js**: `NEXT_PUBLIC_AUTHIFYER_PUBLISHABLE_KEY`\r\n> - **CRA**: `REACT_APP_AUTHIFYER_PUBLISHABLE_KEY`\r\n\r\n#### Example with Environment Variable (Vite)\r\n\r\n```bash\r\n# .env\r\nVITE_AUTHIFYER_PUBLISHABLE_KEY=pk_your_publishable_key_here\r\n```\r\n\r\n```tsx\r\n// No need to pass publishableKey — the SDK reads it from env automatically\r\n<AuthifyerProvider>\r\n  <App />\r\n</AuthifyerProvider>\r\n```\r\n\r\n#### Self-Hosted Backend\r\n\r\n```tsx\r\n<AuthifyerProvider\r\n  publishableKey=\"pk_your_key\"\r\n  backendUrl=\"https://your-auth-server.example.com\"\r\n>\r\n  <App />\r\n</AuthifyerProvider>\r\n```\r\n\r\n---\r\n\r\n## Authentication Methods\r\n\r\n### 1. OAuth Login (Google / GitHub)\r\n\r\nThe SDK provides straightforward OAuth login. When a user clicks the OAuth button, they are redirected to the provider (e.g., Google or GitHub), authenticated, and returned to your application with tokens automatically handled.\r\n\r\n#### Using Pre-built Components\r\n\r\nThe `<SignIn />` and `<SignUp />` components include OAuth buttons automatically based on your project configuration:\r\n\r\n```tsx\r\nimport { SignIn } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction LoginPage() {\r\n  return <SignIn />;\r\n}\r\n```\r\n\r\n#### Using the Client Directly (Custom UI)\r\n\r\nIf you need to build your own login UI, use the `useAuthifyer()` hook:\r\n\r\n```tsx\r\nimport { useAuthifyer } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction CustomLogin() {\r\n  const client = useAuthifyer();\r\n\r\n  return (\r\n    <div>\r\n      <button onClick={() => client.signInWithOAuth('google')}>\r\n        Sign in with Google\r\n      </button>\r\n      <button onClick={() => client.signInWithOAuth('github')}>\r\n        Sign in with GitHub\r\n      </button>\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n#### How OAuth Works Under the Hood\r\n\r\n```\r\n1. User clicks \"Continue with Google\"\r\n2. SDK redirects to: /oauth2/authorization/google?publishable_key=<key>&redirect_uri=<origin>\r\n3. User authenticates on Google's consent screen\r\n4. Backend handles the callback, creates a session\r\n5. User is redirected back to your app with tokens in the URL\r\n6. SDK automatically extracts tokens from the URL, stores them, and cleans the URL\r\n7. User is now authenticated\r\n```\r\n\r\n---\r\n\r\n### 2. Email/Password Sign Up\r\n\r\nThe SDK provides a full registration flow with built-in OTP (One-Time Password) email verification.\r\n\r\n#### Using the Pre-built Component\r\n\r\n```tsx\r\nimport { SignUp } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction RegisterPage() {\r\n  return <SignUp />;\r\n}\r\n```\r\n\r\n#### How the Sign Up and OTP Verification Flow Works\r\n\r\n```\r\nStep 1: User enters email & password and clicks \"Continue\"\r\nStep 2: SDK calls POST /authifyer/project/register/email with user details\r\nStep 3: Backend creates the user and sends a 6-digit OTP code to the email\r\nStep 4: SDK automatically switches to the OTP verification screen\r\nStep 5: User enters the 6-digit code and clicks \"Verify Code\"\r\nStep 6: SDK calls POST /api/auth/verify-email to verify the token\r\nStep 7: Backend verifies the OTP code\r\nStep 8: On success, user is fully authenticated\r\n```\r\n\r\n#### Custom Sign Up with Manual OTP Handling\r\n\r\n```tsx\r\nimport { useAuthifyer } from '@abhiraj_patil/authifyer-sdk';\r\nimport { useState } from 'react';\r\n\r\nfunction CustomSignUp() {\r\n  const client = useAuthifyer();\r\n  const [step, setStep] = useState<'register' | 'verify'>('register');\r\n  const [email, setEmail] = useState('');\r\n  const [password, setPassword] = useState('');\r\n  const [subjectId, setSubjectId] = useState('');\r\n  const [otpCode, setOtpCode] = useState('');\r\n\r\n  // Step 1: Register the user\r\n  const handleRegister = async () => {\r\n    try {\r\n      const data = await client.signUpWithEmail(email, password);\r\n      if (data?.subjectId) {\r\n        setSubjectId(data.subjectId);\r\n        setStep('verify'); // Move to OTP verification\r\n      }\r\n    } catch (err) {\r\n      console.error('Registration failed', err);\r\n    }\r\n  };\r\n\r\n  // Step 2: Verify the OTP code\r\n  const handleVerify = async () => {\r\n    try {\r\n      await client.verifyEmail(otpCode, subjectId);\r\n      // User is now verified and signed in\r\n    } catch (err) {\r\n      console.error('Verification failed', err);\r\n    }\r\n  };\r\n\r\n  if (step === 'verify') {\r\n    return (\r\n      <div>\r\n        <h2>Check your email</h2>\r\n        <p>We sent a 6-digit code to {email}</p>\r\n        <input\r\n          value={otpCode}\r\n          onChange={(e) => setOtpCode(e.target.value)}\r\n          placeholder=\"Enter 6-digit code\"\r\n          maxLength={6}\r\n        />\r\n        <button onClick={handleVerify}>Verify</button>\r\n      </div>\r\n    );\r\n  }\r\n\r\n  return (\r\n    <div>\r\n      <input value={email} onChange={(e) => setEmail(e.target.value)} placeholder=\"Email\" />\r\n      <input value={password} onChange={(e) => setPassword(e.target.value)} placeholder=\"Password\" type=\"password\" />\r\n      <button onClick={handleRegister}>Sign Up</button>\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n---\r\n\r\n### 3. Email/Password Sign In\r\n\r\n#### Using the Pre-built Component\r\n\r\n```tsx\r\nimport { SignIn } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction LoginPage() {\r\n  return <SignIn />;\r\n}\r\n```\r\n\r\n#### Using the Client Directly\r\n\r\n```tsx\r\nimport { useAuthifyer } from '@abhiraj_patil/authifyer-sdk';\r\nimport { useState } from 'react';\r\n\r\nfunction CustomLogin() {\r\n  const client = useAuthifyer();\r\n  const [email, setEmail] = useState('');\r\n  const [password, setPassword] = useState('');\r\n\r\n  const handleLogin = async () => {\r\n    try {\r\n      await client.signInWithEmail(email, password);\r\n      // User is now signed in — session & tokens are managed automatically\r\n    } catch (err) {\r\n      console.error('Invalid credentials');\r\n    }\r\n  };\r\n\r\n  return (\r\n    <form onSubmit={(e) => { e.preventDefault(); handleLogin(); }}>\r\n      <input value={email} onChange={(e) => setEmail(e.target.value)} placeholder=\"Email\" />\r\n      <input value={password} onChange={(e) => setPassword(e.target.value)} placeholder=\"Password\" type=\"password\" />\r\n      <button type=\"submit\">Sign In</button>\r\n    </form>\r\n  );\r\n}\r\n```\r\n\r\n---\r\n\r\n## Pre-built UI Components\r\n\r\nAll components include default styling for ease of use.\r\n\r\n### `<SignIn />`\r\n\r\nFull sign-in form with OAuth buttons and email/password fields. Adapts automatically to your project's enabled authentication methods.\r\n\r\n```tsx\r\nimport { SignIn } from '@abhiraj_patil/authifyer-sdk';\r\n\r\n<SignIn />\r\n```\r\n\r\n### `<SignUp />`\r\n\r\nFull registration form with OAuth buttons, email/password fields, and OTP email verification flow.\r\n\r\n```tsx\r\nimport { SignUp } from '@abhiraj_patil/authifyer-sdk';\r\n\r\n<SignUp />\r\n```\r\n\r\n### `<UserButton />`\r\n\r\nA circular avatar button indicating the user's status, opening a dropdown menu with:\r\n- User information (name and email)\r\n- **Manage Account**: opens the `<UserProfile />` modal\r\n- **Sign Out**\r\n\r\n```tsx\r\nimport { UserButton } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction Navbar() {\r\n  return (\r\n    <nav>\r\n      <h1>My App</h1>\r\n      <UserButton />\r\n    </nav>\r\n  );\r\n}\r\n```\r\n\r\n### `<UserProfile />`\r\n\r\nAccount management modal including:\r\n- Profile overview (name, email, provider, verification status)\r\n- Sign out action\r\n- Delete account (with confirmation prompt)\r\n\r\n```tsx\r\nimport { UserProfile } from '@abhiraj_patil/authifyer-sdk';\r\n\r\n<UserProfile onClose={() => setShowProfile(false)} />\r\n```\r\n\r\n---\r\n\r\n## React Hooks\r\n\r\n### `useUser()`\r\n\r\nReturns the current user object and authentication state.\r\n\r\n```tsx\r\nimport { useUser } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction Dashboard() {\r\n  const { user, isSignedIn, isLoading } = useUser();\r\n\r\n  if (isLoading) return <p>Loading...</p>;\r\n  if (!isSignedIn) return <p>Please sign in</p>;\r\n\r\n  return (\r\n    <div>\r\n      <p>Name: {user.name}</p>\r\n      <p>Email: {user.email}</p>\r\n      <p>Provider: {user.provider}</p>\r\n      <p>Email Verified: {user.emailVerified ? 'Yes' : 'No'}</p>\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n### `useSession()`\r\n\r\nReturns the current session object with the JWT token.\r\n\r\n```tsx\r\nimport { useSession } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction ApiCaller() {\r\n  const { session, isSignedIn } = useSession();\r\n\r\n  const callProtectedApi = async () => {\r\n    if (!isSignedIn) return;\r\n\r\n    const res = await fetch('/api/data', {\r\n      headers: {\r\n        Authorization: `Bearer ${session.token}`,\r\n      },\r\n    });\r\n    // Handle response...\r\n  };\r\n}\r\n```\r\n\r\n### `useAuth()`\r\n\r\nReturns the full authentication context including `client`, `user`, `session`, `config`, and `isLoading`.\r\n\r\n```tsx\r\nimport { useAuth } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction FullControl() {\r\n  const { client, user, session, config, isLoading } = useAuth();\r\n  // Access configuration and instances directly\r\n}\r\n```\r\n\r\n### `useAuthifyer()`\r\n\r\nReturns the raw `AuthifyerClient` instance for direct API calls.\r\n\r\n```tsx\r\nimport { useAuthifyer } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction Actions() {\r\n  const client = useAuthifyer();\r\n\r\n  return (\r\n    <div>\r\n      <button onClick={() => client.signOut()}>Sign Out</button>\r\n      <button onClick={() => client.deleteAccount()}>Delete Account</button>\r\n      <button onClick={() => client.refreshSession()}>Refresh Session</button>\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n---\r\n\r\n## Session and Token Management\r\n\r\nThe SDK handles session management automatically as follows:\r\n\r\n### Token Architecture\r\n\r\n| Token | Storage | Lifetime | Purpose |\r\n|-------|---------|----------|---------|\r\n| **Access Token** (JWT) | `localStorage` | 5 minutes | Authenticates API requests |\r\n| **Refresh Token** | `localStorage` | Long-lived | Obtains new access tokens silently |\r\n\r\n### Automatic Token Refresh\r\n\r\n- The SDK uses a background timer that refreshes the access token every **4.5 minutes** (before the 5-minute expiry).\r\n- Upon page reload, the SDK restores the session from `localStorage`.\r\n- If the access token has expired but a refresh token exists, a new access token is obtained automatically.\r\n- This process requires no user interaction and operates silently in the background.\r\n\r\n### Session Lifecycle\r\n\r\n```\r\nApp loads → AuthifyerProvider mounts\r\nSDK checks URL for OAuth redirect tokens (stores them and cleans URL if found)\r\nSDK checks localStorage for existing access token\r\nIf valid, restores session\r\nIf no valid access token, attempts refresh using refresh token\r\nIf successful, new access token is issued\r\nIf no refresh token, user is required to sign in\r\n\r\nAfter sign in:\r\nAccess token is saved to localStorage and used in Authorization headers\r\nRefresh token is saved to localStorage\r\nAuto-refresh timer starts (every 4.5 min)\r\n\r\nOn sign out:\r\nTokens are cleared from localStorage\r\nSession is nullified\r\nAuto-refresh timer is stopped\r\n```\r\n\r\n---\r\n\r\n## TypeScript Types\r\n\r\n### `User`\r\n\r\n```typescript\r\ninterface User {\r\n  authifyerId: string;    // Unique user ID\r\n  name: string;           // User's display name\r\n  email: string;          // User's email address\r\n  emailVerified: boolean; // Whether email has been verified\r\n  isActive: boolean;      // Whether the account is active\r\n  provider: string;       // Auth provider: 'email' | 'google' | 'github'\r\n}\r\n```\r\n\r\n### `Session`\r\n\r\n```typescript\r\ninterface Session {\r\n  token: string;     // The JWT access token\r\n  sessionId: string; // Unique session identifier\r\n  expireAt: number;  // Token expiration timestamp (Unix)\r\n  user: User;        // The authenticated user\r\n}\r\n```\r\n\r\n### `ProjectConfig`\r\n\r\n```typescript\r\ninterface ProjectConfig {\r\n  projectName?: string;                    // Your project name\r\n  emailPasswordEnabled: boolean;           // Is email/password auth enabled\r\n  oauthProviders: ('google' | 'github')[]; // Enabled OAuth providers\r\n}\r\n```\r\n\r\n---\r\n\r\n## Client API Reference\r\n\r\nThe `AuthifyerClient` (accessed via `useAuthifyer()`) exposes the following methods:\r\n\r\n| Method | Description |\r\n|--------|-------------|\r\n| `signInWithEmail(email, password)` | Sign in with email and password |\r\n| `signUpWithEmail(email, password)` | Register a new user (returns `subjectId` for OTP) |\r\n| `verifyEmail(token, subjectId)` | Verify email with 6-digit OTP code |\r\n| `signInWithOAuth('google' | 'github')` | Redirect to OAuth provider for login |\r\n| `signOut()` | Sign out and clear all tokens |\r\n| `deleteAccount()` | Permanently delete the user's account |\r\n| `refreshSession()` | Manually refresh the access token |\r\n| `rotateSession()` | Rotate the underlying long-lived session |\r\n\r\n---\r\n\r\n## Full Example Application\r\n\r\n```tsx\r\n// main.tsx\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom/client';\r\nimport { AuthifyerProvider } from '@abhiraj_patil/authifyer-sdk';\r\nimport App from './App';\r\n\r\nReactDOM.createRoot(document.getElementById('root')!).render(\r\n  <AuthifyerProvider publishableKey=\"pk_your_key_here\">\r\n    <App />\r\n  </AuthifyerProvider>\r\n);\r\n```\r\n\r\n```tsx\r\n// App.tsx\r\nimport { useUser, SignIn, UserButton } from '@abhiraj_patil/authifyer-sdk';\r\n\r\nfunction App() {\r\n  const { user, isSignedIn, isLoading } = useUser();\r\n\r\n  if (isLoading) {\r\n    return <div className=\"loading\">Loading...</div>;\r\n  }\r\n\r\n  // Not signed in — show auth forms\r\n  if (!isSignedIn) {\r\n    return (\r\n      <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', minHeight: '100vh' }}>\r\n        {/* The SDK handles toggling between SignIn and SignUp automatically */}\r\n        <SignIn />\r\n      </div>\r\n    );\r\n  }\r\n\r\n  // Signed in — show dashboard\r\n  return (\r\n    <div>\r\n      <nav style={{ display: 'flex', justifyContent: 'space-between', padding: '1rem 2rem', borderBottom: '1px solid #eee' }}>\r\n        <h1>My Application</h1>\r\n        <UserButton />\r\n      </nav>\r\n      <main style={{ padding: '2rem' }}>\r\n        <h2>Welcome, {user?.name || user?.email}!</h2>\r\n        <p>You are signed in via <strong>{user?.provider}</strong>.</p>\r\n      </main>\r\n    </div>\r\n  );\r\n}\r\n\r\nexport default App;\r\n```\r\n\r\n---\r\n\r\n## FAQ\r\n\r\n**Q: How do I protect routes?**\r\n\r\nUse the `useUser()` hook to verify the authentication state and conditionally render content:\r\n\r\n```tsx\r\nconst { isSignedIn } = useUser();\r\nif (!isSignedIn) return <Navigate to=\"/login\" />;\r\n```\r\n\r\n**Q: Can I use this with Next.js?**\r\n\r\nYes. Set your publishable key as `NEXT_PUBLIC_AUTHIFYER_PUBLISHABLE_KEY` in `.env.local` and wrap your application diagram with `<AuthifyerProvider>`.\r\n\r\n**Q: How do I access the JWT token for API calls?**\r\n\r\nRetrieve the session via `useSession` and append it to your authorization headers:\r\n\r\n```tsx\r\nconst { session } = useSession();\r\n// Use session?.token in your Authorization header\r\n```\r\n\r\n**Q: What happens when the access token expires?**\r\n\r\nThe SDK automatically refreshes the token prior to expiration, ensuring no interruption to the user's session.\r\n\r\n---\r\n\r\n## License\r\n\r\nISC\r\n","readmeFilename":"README.md"}