Closed chrisekelley closed 11 years ago
I've updated this branch to use everyauth instead of basicauth and am now using a registration page to capture a username and gravitar url. The server pushes username/gravatar to the client in the settings, which are used by voxel-client to create the game instance on the client side. Currently i'm only console.log-ing the username; next step is to get the avatar to display it (and perhaps do something neat with the gravatar.
TODO: persistent storage (Leveldb on server side?) or duplicate e-mail address checking.
heya -- I just got back from vacation
instead of turning this module into a full fledged app I think it would make more sense to take the stuff from this pull req and make a new higher level server repo. I have a repo called http://github.com/maxogden/github-oauth that just exposes the function (req, res) handlers instead of middleware, i'll try to figure out a way to do something similar with voxel-server so that it could be really simple and you can require it and hook it up to any web framework
Max - That sounds like a good idea; the voxel-server fork I'm working on is probably already too specialized anyway. I'm not even sure if it's necessary for you to modify the voxel-server api anyway; bootstrapping from hello-world.js is pretty straightforward to me.
Max - I changed the server to express to use the basicAuth middleware to easily seed request with username. Next step is to use username (in request) to customize the avatar. Down the road I'd like to upgrade to everyauth and have a form with extra registration fields (choose your avatar and/or gravatar support), but I'm trying to keep focused on bootstrapping now.