Skip to main content

Posts

Showing posts from 2013

Local Testing OAuth Social Signin

On some recent Grails projects, I have been looking at using the Twitter and Facebook OAuth signin process. This process allows you to authenticate users based on their Twitter/Facebook logins, without the need for the user to expose their passwords to your site. When you create your 'application' within Twitter or Facebook, it is necessary to define the URL where the application can be accessed. Twitter and Facebook will only redirect to this URL during the authentication process. I have tested running some applications on Heroku or Appfog , with Twitter and Facebook happy to redirect to the appropriate URLs with successful authentication. However, when testing locally, I follow these steps to work through the authentication process. 1. App Context Ensure that the Grails app context is '/' - as the application is generally deployed this way on Heroku/Appfog: Config.groovy grails.app.context = '/' 2. Port Binding: While the local application w...

Deploying With Git

I have the mis fortune to work on a number of PHP based web applications at work. Previously, the deployment process involved determining which files had changed since the last release and copying them across to the server. Needless to say, this was an error-prone and inefficient way of deploying updates. Gitobots, Roll Out We use Git for our version control and, with Heroku's push to deploy  in mind, I looked further into the possibilities of using Git for our deployment process. Abhijit Menon-Sen's article details the process very well. With a few slight variations, these are the steps I follow to deploy changes via Git. Prime Remote On the remote server for your application (e.g. production, staging or test), create a new, bare Git repository for your codebase: cd /cygdrive/c/repo mkdir project.git cd project.git git --bare init Hooks As this bare repository does not contain a working tree (the actual source), a Git hook is used to checkout the code t...