Facebook passportjs.org implementation. Reward: 40 USD
Closed this issue · 3 comments
MySQL DB name have to be "webRunes_Login" with columns:
userID (GUID)
profileURI (default: n/a. http uri, i'll give more info later)
signInDate (date/time)
lastVisitDate (date/time)
invitedBy (default: n/a)
FacebookID (id)
You need a separate table for Facebook, so create "webRunes_Login-Facebook", we will accept more providers soon.
You have to create empty html page with only "Login" Facebook button, use passportjs.org. After user is logged in, change button on "Logout"
Anonymous account:
Once user opens page we auto sign up his PC via cookies and write in it the first visit date for countdown: "Upgrade guest account for free 30 days left". Don't worry about nothing except Facebook button - once user clicks it please open auth popup. If user successfully logged, create a new record in "webRunes_Login-Facebook" with minimal info, just for next auth. Save data in "signInDate" from cookie after first auth login and show "Success! you've linked 'name here' Facebook account." And change "Logged as I'm Anonymous" to "Logged as User Name". Once user click "lock" icon sign out him.
If user do not link auth account within 30 days, we begin process again (reset and start next 30 days).
DO NOT use server credentials in the code and use https://github.com/flatiron/nconf to create conf files. This conf file will be uploaded in aws separately. You will get DB and Facebook credentials before start.
Help links:
Following https://github.com/felixge/node-style-guide is required
http://blog.risingstack.com/node-js-best-practices/ Node.js Best Practices
http://pavels.in.ua/javascript-debugging-console/ debugging (RU. use google translate)
https://github.com/sindresorhus/awesome-nodejs
Yet, work is not started . I will start on this 5th November.
Please add FB button here
https://github.com/webRunes/Login-WRIO-App/blob/master/Widget/template.html
you will see this HTML here (after we do autodeploy)
http://webrunes.github.io/webRunes-WRIO-Hub/1WJyH1k7_en-US.html
Login ticket imported from
https://github.com/webRunes/Login-WRIO-App/blob/master/Widget/template.html
related to #9