OAuth2 authentication (Google Apps) in SuiteCRM

Go here for an example:

I ended up having to create a slightly more complicated version than this with multiple OAuths as people wanted multiple authentication mechanisms…