{"_id":"oauthio-web","_rev":"17-b72bb7677d1f28ff8a4b247a400d33e2","name":"oauthio-web","description":"OAuth that just works","dist-tags":{"latest":"0.6.2"},"versions":{"0.4.4":{"name":"oauthio-web","version":"0.4.4","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7","q":"^1.4.1"},"gitHead":"619efc77dc07c0b6ced2a0bfedc2d1146e11525e","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.4.4","_shasum":"ba3c4ad9c348bb0f790dcdd251454503c95f2675","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.2","_npmUser":{"name":"webshell","email":"team@webshell.io"},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"dist":{"shasum":"ba3c4ad9c348bb0f790dcdd251454503c95f2675","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.4.4.tgz","integrity":"sha512-HbH5A0u/pQkaw1ECbUSDtm8OzadBFeA9w/Ag2TmjZugigzYxw2Hv/nh8wMjZF9BqOxviNH2ZkaAWLMkbW+lTVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECLFKqn5kxyE3WZ0adLHhq4/DxQ0vtErAZ4jUgu03agAiEAp75EhcMKTpZG7kVeBG8gyJpvTB4DRqbhTRxDDrN8JQI="}]}},"0.4.5":{"name":"oauthio-web","version":"0.4.5","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7","q":"^1.4.1"},"gitHead":"02b40809734a48b7901616fe83106a85263d72cb","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.4.5","_shasum":"0bbb9dc8bd6eed0041462293a9ee65262ae4f2c5","_from":".","_npmVersion":"3.4.0","_nodeVersion":"4.2.1","_npmUser":{"name":"webshell","email":"team@webshell.io"},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"dist":{"shasum":"0bbb9dc8bd6eed0041462293a9ee65262ae4f2c5","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.4.5.tgz","integrity":"sha512-MOUGQm6SIa7eNU4tbPy5t50i+NV2AR3/DXsApKrCJjPnG/NJCDdSezCXZSehvXAr3hQylP4OYZg0FGtegtN9Lw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAfGRuIZJpK6ZEd5P6iUe27nhoip58NO26IiMlYB9HiwIgZdKeLy9Mx7Gq59a6zs6a3WJHTgHHK1fatw8L4L53fOc="}]}},"0.4.6":{"name":"oauthio-web","version":"0.4.6","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7","q":"^1.4.1"},"gitHead":"5b94fdf2db3c3deb315fce3854d8cffba0872605","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.4.6","_shasum":"09e17b079015702b6ef8c6c8dbbc0cd2cbf3008e","_from":".","_npmVersion":"3.4.0","_nodeVersion":"4.2.1","_npmUser":{"name":"webshell","email":"team@webshell.io"},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"dist":{"shasum":"09e17b079015702b6ef8c6c8dbbc0cd2cbf3008e","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.4.6.tgz","integrity":"sha512-mIFcHXXADjj5LGPhw4HJulXeYTLfKiU44q3L/K1VWYvUzt3IlQ+QzhXM/yks0vlBplzdVui5v870S5zqunSqwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICP3MKtaFtAW872hBbHBn7Z44VfPUmbyG72HHqp/F/VfAiBOwrfu5YYk8+8lnmGPMRncxg+SQ3/hND0uxA3sU6qZcg=="}]}},"0.4.7":{"name":"oauthio-web","version":"0.4.7","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7","q":"^1.4.1"},"gitHead":"afc4ed422ec6265f28c54f5bc9ac9097554dc146","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.4.7","_shasum":"fff731646b0f320aed57e1f4bb457dce6b9b3980","_from":".","_npmVersion":"3.4.0","_nodeVersion":"4.2.1","_npmUser":{"name":"webshell","email":"team@webshell.io"},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"dist":{"shasum":"fff731646b0f320aed57e1f4bb457dce6b9b3980","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.4.7.tgz","integrity":"sha512-PHZWzLjoiNmAojsErXj54dy2m3FAik8Ads/ADkYydRTDtT6Td0XeuGUQSCIahE7ee2ZpxCHOBww0Bx33rQYrlw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDWWpYCcWZ/yewOUMUv9jbQc8MG7U25zvujFsX0dXGu5AiB2RvJnw6fUKK30SrFHclueBpoYWGqQMvsWWLE42H+v5A=="}]}},"0.5.0":{"name":"oauthio-web","version":"0.5.0","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7"},"gitHead":"3ef62f37966a8465d8c7e1995fe61f30456ea216","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.5.0","_shasum":"def746efb3afdacfecca4ef0541c438ba614fcf4","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"webshell","email":"team@webshell.io"},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"dist":{"shasum":"def746efb3afdacfecca4ef0541c438ba614fcf4","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.5.0.tgz","integrity":"sha512-q6PWc+rOdkJSuc0AP3RDaeVvqRQ24DHs7IRlKaoaU8CE3h/mBfjlWruICfZYCX7vUxfCd4t3diYFYHyojLXrPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAxIqu7kT7XAmIPDNEXb1QjZ9ah4RbnjeveuekxT5+dUAiEA77EHHU9vj9CvmhRhS1SySGVHzc68NYQU7kdpcXNR8uM="}]}},"0.5.1":{"name":"oauthio-web","version":"0.5.1","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7"},"gitHead":"34c41e747ad1d3b6f4ea5ba01bc82e19326cc9ca","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.5.1","_shasum":"a7c066107783972569ae6d4672e07ee06b4821f1","_from":".","_npmVersion":"3.3.12","_nodeVersion":"0.12.7","_npmUser":{"name":"webshell","email":"team@webshell.io"},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"dist":{"shasum":"a7c066107783972569ae6d4672e07ee06b4821f1","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.5.1.tgz","integrity":"sha512-vQhUwUnT7NDgHbROOc/soCY4jz4VTBPaNJPzp7CPo0igDA2uAzm5PCEjd3uaGm/SlFHbnj/h6Y4QIAflbBP+3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF747796UgazGc94LSm2hBeIK+iNPJ6ecHGuJQyKRKbLAiEA0bgW5JEPBlxGSt8M/wBvCic6SDwi4fj2EOM37MwGS50="}]},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/oauthio-web-0.5.1.tgz_1456339684679_0.27708229166455567"}},"0.5.2":{"name":"oauthio-web","version":"0.5.2","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7"},"gitHead":"3902d3140420be818bf3a7aac74f9d0351d7048c","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.5.2","_shasum":"63f8d7d2c70a1decf2c02db60da48b771a8e122e","_from":".","_npmVersion":"3.3.12","_nodeVersion":"0.12.7","_npmUser":{"name":"webshell","email":"team@webshell.io"},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"dist":{"shasum":"63f8d7d2c70a1decf2c02db60da48b771a8e122e","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.5.2.tgz","integrity":"sha512-GXTfyO6GSZDlTfmGPXhegcSbTPdxNY8tq/AmUOaxO7WkMbCNnYvn8W1TarZnJxuOb473M3wXBr3DQYD6Z2xcXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHz8LmsVmb1rqW1vbkLuHrjVjpIwImWExcG60CYe6IhAIhAJwUxXI/2qNiVMjpC8k3q/JrMGuWnrrYwclosxkb9GH+"}]},"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/oauthio-web-0.5.2.tgz_1456764850610_0.31187366717495024"}},"0.6.0":{"name":"oauthio-web","version":"0.6.0","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7"},"gitHead":"a97af3f2039f69f4149b0fe4443175fc88b4c7ff","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.6.0","_shasum":"5631782a0e9371e8d5865c14ad81d34ab3f956d4","_from":".","_npmVersion":"3.10.3","_nodeVersion":"0.12.7","_npmUser":{"name":"webshell","email":"team@webshell.io"},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"dist":{"shasum":"5631782a0e9371e8d5865c14ad81d34ab3f956d4","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.6.0.tgz","integrity":"sha512-6+IniQ2rzxyohEDXg4iPZgBbg3ZAnclAvfYj+Y1hPLQv790XO/z4D/ulgfxub7Gss09ZpvKWmqbmU3BNwrqCYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEg8qBfK9B64vT3imQRovfcFa0otO5sCoBE6+orBWnigIhANrevhE1z9UOBLogLFQe+qvSO/+bUaKr+yZ1BrCtmkIy"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/oauthio-web-0.6.0.tgz_1475106365163_0.03258559154346585"}},"0.6.1":{"name":"oauthio-web","version":"0.6.1","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7"},"gitHead":"8d128c07c2bf8e78d0964fd3ac363a1fb0906bb2","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.6.1","_shasum":"5135da9f29b32048d8c0bb0b25ff86b56ecffc6d","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"webshell","email":"team@webshell.io"},"dist":{"shasum":"5135da9f29b32048d8c0bb0b25ff86b56ecffc6d","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.6.1.tgz","integrity":"sha512-/KkZgjIWVMt7lkcIqjBGKnLRnebjTDCVvzUwUqsMZkJ9mBEHUKxV/rl0SW0Bmub75RxeB/A9abaOeLY7ri+Wag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUKhGU3wDlLASZ1ziztmHkz0Cdn0EbDfxIFxGqdqqzgwIhAJSR05oxdDs9LVNrSohbpycu5AAkl/fFHr9jVmMTEFyE"}]},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/oauthio-web-0.6.1.tgz_1475640548067_0.30869881249964237"}},"0.6.2":{"name":"oauthio-web","version":"0.6.2","description":"OAuth that just works","main":"dist/oauth.min.js","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"directories":{"test":"tests"},"scripts":{"test":"istanbul cover jasmine-node tests/unit/spec"},"author":{"name":"oauth.io"},"license":"Apache-2.0","devDependencies":{"grunt-contrib-coffee":"~0.13.0","grunt-contrib-watch":"~0.6.1","grunt":"~0.4.5","grunt-concurrent":"~2.0.3","browserify":"~11.2.0","grunt-browserify":"~4.0.1","temporary":"0.0.8","grunt-contrib-uglify":"~0.9.2","rewire":"~2.0.0","envify":"~3.4.0","grunt-jasmine-node":"~0.2.1","jasmine-node":"~2.0.x","istanbul":"~0.2.7"},"gitHead":"17fb9fb057a94a50628761e0420b6257d3d1a513","bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"homepage":"https://github.com/oauth-io/oauth-js#readme","_id":"oauthio-web@0.6.2","_npmVersion":"5.4.2","_nodeVersion":"7.7.3","_npmUser":{"name":"webshell","email":"team@webshell.io"},"dist":{"integrity":"sha512-GoP50/9MQii8g2PxRtwqZx9IjyyoXEsRSL9q9Cq08vXjs2s2vBUqyfjcgc7+FSpAWN31SPmkNxRHFazAuZJCOg==","shasum":"3bcabbb8a28af369b5f018d0a7ea5320a1e1df49","tarball":"https://registry.npmjs.org/oauthio-web/-/oauthio-web-0.6.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxPdNTykQOTARPpt9hR0dsK5h3cprPhR09xd0v1Df1LQIhAPf07x0goKr53sp0QyxXPEnnQMg4oUid1h6dXoax4aOW"}]},"maintainers":[{"name":"webshell","email":"team@webshell.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/oauthio-web-0.6.2.tgz_1510544300093_0.2532794321887195"}}},"readme":"OAuth.io JavaScript SDK\n=======================\n\nThis is the JavaScript SDK for [OAuth.io](https://oauth.io). OAuth.io allows you to integrate **100+ providers** really easily in your web app, without worrying about each provider's OAuth specific implementation.\n\nInstallation\n============\n\nGetting the SDK\n---------------\n\nTo get the SDK, you can :\n\n- download the zip file from this repository\n- get it via Bower or npm (for browserify)\n\n**Zip file**\n\nJust copy the dist/oauth.js or dist/oauth.min.js to your project.\n\n**Bower**\n\n```sh\n$ bower install oauthio-web\n```\n\n**npm for browserify**\n\n```sh\n$ npm install oauthio-web\n```\n\n\nIntegrating in your project\n---------------------------\n\nIn the `<head>` of your HTML, include OAuth.js\n\n`<script src=\"/path/to/oauth.js\"></script>`\n\nIn your Javascript, add this line to initialize OAuth.js\n\n`OAuth.initialize('your_app_public_key');`\n\nUsage\n=====\n\nTo connect your user using facebook, 2 methods:\n\nPopup mode\n----------\n\n ```javascript\n//Using popup (option 1)\nOAuth.popup('facebook')\n.done(function(result) {\n  //use result.access_token in your API request \n  //or use result.get|post|put|del|patch|me methods (see below)\n})\n.fail(function (err) {\n  //handle error with err\n});\n ```\n\nRedirection mode\n----------------\n\n ```javascript\n//Using redirection (option 2)\nOAuth.redirect('facebook', \"callback/url\");\n ```\n\nIn callback url :\n\n ```javascript\nOAuth.callback('facebook')\n.done(function(result) {\n    //use result.access_token in your API request\n    //or use result.get|post|put|del|patch|me methods (see below)\n})\n.fail(function (err) {\n    //handle error with err\n});\n ```\n\nMaking requests\n---------------\n\nYou can make requests to the provider's API manually with the access token you got from the `popup` or `callback` methods, or use the request methods stored in the `result` object.\n\n**GET Request**\n\nTo make a GET request, you have to call the `result.get` method like this :\n\n```javascript\n//Let's say the /me endpoint on the provider API returns a JSON object\n//with the field \"name\" containing the name \"John Doe\"\nOAuth.popup(provider)\n.done(function(result) {\n    result.get('/me')\n    .done(function (response) {\n        //this will display \"John Doe\" in the console\n        console.log(response.name);\n    })\n    .fail(function (err) {\n        //handle error with err\n    });\n})\n.fail(function (err) {\n    //handle error with err\n});\n```\n\n**POST Request**\n\nTo make a POST request, you have to call the `result.post` method like this :\n\n```javascript\n//Let's say the /message endpoint on the provider waits for\n//a POST request containing the fields \"user_id\" and \"content\"\n//and returns the field \"id\" containing the id of the sent message \nOAuth.popup(provider)\n.done(function(result) {\n    result.post('/message', {\n        data: {\n            user_id: 93,\n            content: 'Hello Mr. 93 !'\n        }\n    })\n    .done(function (response) {\n        //this will display the id of the message in the console\n        console.log(response.id);\n    })\n    .fail(function (err) {\n        //handle error with err\n    });\n})\n.fail(function (err) {\n    //handle error with err\n});\n```\n\n**PUT Request**\n\nTo make a PUT request, you have to call the `result.post` method like this :\n\n```javascript\n//Let's say the /profile endpoint on the provider waits for\n//a PUT request to update the authenticated user's profile \n//containing the field \"name\" and returns the field \"name\" \n//containing the new name\nOAuth.popup(provider)\n.done(function(result) {\n    result.put('/message', {\n        data: {\n            name: \"John Williams Doe III\"\n        }\n    })\n    .done(function (response) {\n        //this will display the new name in the console\n        console.log(response.name);\n    })\n    .fail(function (err) {\n        //handle error with err\n    });\n})\n.fail(function (err) {\n    //handle error with err\n});\n```\n\n**PATCH Request**\n\nTo make a PATCH request, you have to call the `result.patch` method like this :\n\n```javascript\n//Let's say the /profile endpoint on the provider waits for\n//a PATCH request to update the authenticated user's profile \n//containing the field \"name\" and returns the field \"name\" \n//containing the new name\nOAuth.popup(provider)\n.done(function(result) {\n    result.patch('/message', {\n        data: {\n            name: \"John Williams Doe III\"\n        }\n    })\n    .done(function (response) {\n        //this will display the new name in the console\n        console.log(response.name);\n    })\n    .fail(function (err) {\n        //handle error with err\n    });\n})\n.fail(function (err) {\n    //handle error with err\n});\n```\n\n**DELETE Request**\n\nTo make a DELETE request, you have to call the `result.del` method like this :\n\n```javascript\n//Let's say the /picture?id=picture_id endpoint on the provider waits for\n//a DELETE request to delete a picture with the id \"84\"\n//and returns true or false depending on the user's rights on the picture\nOAuth.popup(provider)\n.done(function(result) {\n    result.del('/picture?id=84')\n    .done(function (response) {\n        //this will display true if the user was authorized to delete\n        //the picture\n        console.log(response);\n    })\n    .fail(function (err) {\n        //handle error with err\n    });\n})\n.fail(function (err) {\n    //handle error with err\n});\n```\n\n**Me() Request**\n\nThe `me()` request is an OAuth.io feature that allows you, when the provider is supported, to retrieve a unified object describing the authenticated user. That can be very useful when you need to login a user via several providers, but don't want to handle a different response each time.\n\nTo use the `me()` feature, do like the following (the example works for Facebook, Github, Twitter and many other providers in this case) :\n\n```javascript\n//provider can be 'facebook', 'twitter', 'github', or any supported\n//provider that contain the fields 'firstname' and 'lastname' \n//or an equivalent (e.g. \"FirstName\" or \"first-name\")\nvar provider = 'facebook';\n\nOAuth.popup(provider)\n.done(function(result) {\n    result.me()\n    .done(function (response) {\n        console.log('Firstname: ', response.firstname);\n        console.log('Lastname: ', response.lastname);\n    })\n    .fail(function (err) {\n        //handle error with err\n    });\n})\n.fail(function (err) {\n    //handle error with err\n});\n```\n\n*Filtering the results*\n\nYou can filter the results of the `me()` method by passing an array of fields you need :\n\n```javascript\n//...\nresult.me(['firstname', 'lastname', 'email'/*, ...*/])\n//...\n```\n\n\nContributing\n============\n\nYou are welcome to fork and make pull requests. We will be happy to review them and include them in the code if they bring nice improvements :)\n\nTesting the SDK\n===============\n\nTo test the SDK, you first need to install the npm modules `jasmine-node` and `istanbul` (to get the tests coverage) :\n\n```sh\n$ sudo npm install -g jasmine-node@2.0.0 istanbul\n```\n\nThen you can run the testsuite from the SDK root directory :\n\n```sh\n$ jasmine-node --verbose tests/unit/spec\n```\n\nOnce you've installed `istanbul`, you can run the following command to get coverage information :\n\n```sh\n$ npm test\n```\n\nThe coverage report is generated in the `coverage` folder. You can have a nice HTML render of the report in `coverage/lcof-report/index.html`\n\nLicense\n=======\n\nThis SDK is published under the Apache2 License.\n\n\n\nMore information in [oauth.io documentation](http://oauth.io/#/docs)\n","maintainers":[{"email":"team@webshell.io","name":"webshell"},{"email":"support@oauth.io","name":"oauthio"}],"time":{"modified":"2022-06-22T15:49:41.540Z","created":"2015-10-12T21:04:53.165Z","0.4.4":"2015-10-12T21:04:53.165Z","0.4.5":"2015-11-19T18:20:52.861Z","0.4.6":"2015-11-20T00:48:17.989Z","0.4.7":"2015-11-20T02:36:40.881Z","0.5.0":"2015-12-08T14:03:16.207Z","0.5.1":"2016-02-24T18:48:05.882Z","0.5.2":"2016-02-29T16:54:13.805Z","0.6.0":"2016-09-28T23:46:07.550Z","0.6.1":"2016-10-05T04:09:10.281Z","0.6.2":"2017-11-13T03:38:21.515Z"},"homepage":"https://github.com/oauth-io/oauth-js#readme","repository":{"type":"git","url":"git+https://github.com/oauth-io/oauth-js.git"},"author":{"name":"oauth.io"},"bugs":{"url":"https://github.com/oauth-io/oauth-js/issues"},"license":"Apache-2.0","readmeFilename":"README.md","users":{"shelling":true,"yatarasman":true,"doppelgunner":true}}