I got away with setting up with authentication without having to set an API for our app. Rack::Auth::Basic made it dead easy to ask for credentials and verify users. Since we are doing everything over smart http protocol of git, user can verify themselves just with their username and password. I think I still have to add the part where user can use either his username or email, but that shouldn’t be too difficult.
We support addition of files from our web UI as well, so it was bit tricky to sync the bare repository and the non bare one (we use later for web UI intraction). A lot of things goes on after user does a push. First the obvious, we update the bare repository, next we do a fetch from non-bare one and merge the new changes (how to link), then we go through each commit and generate thumbnail for them and finally if image for inspiration page has not been generated yet then we create that too.
Now there is just one thing left to do, integration of sparkleshare.