Write plan/mockup of how to integrate facebook OAuth login , connecting to a MySQL user accounts database, for a browser game.
I need a barebones test case working like in the diagram: [login to view URL]
I have the basic stuff already created (the login node.js server, already connects to mySQL), and the html site page
(check the project files)
The plan is to just have a simple 'login with facebook' button, which would allow the user to login easily, and it would create an account for the user on my backend mysql database server. The user account would store info for the user, eg. # of coins.
I need an experienced full-stack developer to help design the best system to go from 1) clicking the login-with-facebook button, to 2) contacting my server to create an account in my MySQL database for that user, to 3) authenticating the user automatically every time the user returns to the game website, and 4) updating the value for eg. coins when needed.
My current idea is to run a 'login server' which would run the MySQL database, and have a NodeJS script which would do the mySQL database operations, and also listen for HTTP requests- and the reqests would pass info for new accounts to be created.
I'd prefer it to be in Java, NodeJS, as I am a developer as well and am familiar with these languages. Also, the sever would run a linux OS (ubuntu).