{"id":24568907,"url":"https://github.com/bitliner/fauthentication","last_synced_at":"2025-03-17T05:27:54.765Z","repository":{"id":4670006,"uuid":"5816227","full_name":"bitliner/FAuthentication","owner":"bitliner","description":"Node module to integrate your Node app with Facebook oauth authentication  ","archived":false,"fork":false,"pushed_at":"2012-09-15T03:59:14.000Z","size":485,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T08:22:32.137Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitliner.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-15T00:21:54.000Z","updated_at":"2014-01-07T04:10:06.000Z","dependencies_parsed_at":"2022-09-26T21:51:31.405Z","dependency_job_id":null,"html_url":"https://github.com/bitliner/FAuthentication","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitliner%2FFAuthentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitliner%2FFAuthentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitliner%2FFAuthentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitliner%2FFAuthentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitliner","download_url":"https://codeload.github.com/bitliner/FAuthentication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243978976,"owners_count":20378131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-23T14:55:43.829Z","updated_at":"2025-03-17T05:27:54.736Z","avatar_url":"https://github.com/bitliner.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FAuthentication\n\n\nNode.js module to integrate quickly your Node app with Facebook OAuth authentication\n\n\n\n## How to use it\n\n### 1. create your Facebook app on [Facebook Developers](https://developers.facebook.com/apps)\n\n### 2. install FAuthentication\n\n```js\n\tnpm install fauthentication\n```\n\n### 3. specify settings for FAuthentication (with settings of your Facebook app)\n\n```js\n/* import fauthentication */\n\nvar fauthentication=require('fauthentication')\n\n/* set FAuthentication's options (parameters of Facebook app and callbacks) */\n\nfauthentication.settings({\n    client_id: 'your-app-id',\n    client_secret: 'your-app-secret',\n    redirect_uri: 'http://your-site-domain:your-port/fauthentication/getAccessToken',\n    app: app,\n    callback: function(accessToken){\n\n        console.log('now you have access token',accessToken);\n        fauthentication.getUser(function(user){\n            console.log('Facebook user data',user);\n            // here you can save user, log in...\n        })\n\n    }\n})\n```\n\n\n### 4. bind the urls of your application with FAuthentication's request handlers \n\n```js\n\n/*  set FAuthentication's url*/\n\napp.get('/fauthentication/authenticate',fauthentication.auth)\napp.get('/fauthentication/getAccessToken',fauthentication.getAccessToken) /* this must be according to `redirect_uri` settings (see above) */\n\n``` \n\n### 5. In your login page insert a button to login and corresponding javascript function to open Facebook dialog box\n\n\n```html\n\n...\n\u003cbody\u003e\n\t\u003cscript type=\"text/javascript\"\u003e\n\t\tvar login=function(){\n\t\t\twindow.open('/fauthentication/authenticate?next=/', 'Facebook Login', 'width=300px, height=300');\n\t\t}\n\t\u003c/script\u003e\n\t\u003cbutton onclick=\"login()\"\u003eFacebook Login\u003c/button\u003e\t\t\n\u003c/body\u003e\n...\n\n``` \n\n## Try with examples\n\n```\ngit clone git@github.com:bitliner/FAuthentication.git fauthentication\n\ncd fauthentication/examples/fauthentication-with-express\n\nnpm install\n\nnode app.js\n\n// now in your browser go to http://localhost:3000/ \n\n``` \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitliner%2Ffauthentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitliner%2Ffauthentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitliner%2Ffauthentication/lists"}