How to set up Google oAuth on my server?

Setting Pancake up to use your own server for oAuth 2 authentication is simple. Find the following file:

system/pancake/config/oauth2_gmail.php

  1. Go to the Google Developer Console.
  2. Create a new app. For the Authorized Redirect URIs, you only need to add http://path.to.your/pancake/admin/settings/oauth2gmail.
  3. Enable the Gmail API.
  4. Set the Client ID and Client Secret on the file indicated above.
  5. Enjoy! This is all you need to do.

For more detailed information, check out Using Gmail with XOAUTH2. It's not related to Pancake, but it has screenshots on how to create and set up an app in the Google Developer Console.