We need to develop an internal gmail extension to handle incoming emails so that recipients can interact with our internal software. I tried to figure out how to use OAuth 2.0 in the Gmail Contextual Gadget, but I can not find any specific documentation for this. I could not find anything useful when I was looking for stack overflow using contextual + google-oauth (a keyword recommended by Google).
Before you give me the standard pages, make sure this one has:
- In a minimal Gmail example, a manifest.xml context gadget that uses OAuth 2.0
- Ideally, with an explanation of how to deploy it to a domain (rather than a market), I know that it really has been deployed and tested.
For example, the standard greeting example on the Context Gadgets page uses OpenID ("openIdRealm") and was written before OAuth 2.0:
https://developers.google.com/gmail/contextual_gadgets
OpenID is not allowed in OAuth 2.0:
https://developers.google.com/apps-marketplace/practices#3_use_oauth20
Your application should not use OpenID or OAuth1.0. Any evidence of such use will result in your application being unable to complete the review process.
Please note that context gadgets are Javascript client applications that are very different from web server applications and installed applications. Therefore, OAuth 2.0 should be used as follows:
https://developers.google.com/accounts/docs/OAuth2#clientside https://developers.google.com/accounts/docs/OAuth2UserAgent
But contextual gadgets run in a container that processes the first OAuth call (google call, which calls our site with tokens ...). Living on the client side, contextual gadgets "cannot keep secrets." our site (redirect page, https://example.com/oauth2callback ) should save the access token (and, possibly, update the token) to the session available for our gadget code on the client side.
Ideally, I would not use SSO, which, as I see it, "is only needed for applications placed on the market." An alternative deployment is βfor your domain,β which uses the Google Apps Extension Console :
https://developers.google.com/google-apps/extensions-console/
But the extension console says, from the top: βWe're improving the user interface, try the new developer console,β which refers to:
https://console.developers.google.com/?redirected=true
Developer Console :
- It shows a project that was created earlier in the application extension console. I can click on it to open a large menu (to the side, left).
- API and Auth / Credentials - I created a client identifier and a secret for my application. Apparently, I should use web applications, not a service account or an installed application, because I'm trying to access some user data (email access), not just a Google service, and I'm not a standalone installed application .
It is not possible to report this customer ID anywhere in the context gadget. Is it registered and forgotten?
Also (bug?), The permissions show my client ID in the Service Account section, even if I did NOT create the service account credentials.
And then this: I donβt know how to deploy my contextual gadget (which is not a standalone application) in my domain from this new developer console. It seems that there are only cloud deployment related options and the Compute tabs on the left.
When I try to deploy from the application extension console (which is supposedly not deprecated, only improved), I get this error:
Google Apps Marketplace (I never deployed to marketplace, only my own domain) Application installation not allowed. The OAuth1.0 version is no longer available. Instead, try installing the OAuth2.0 version. [Return to dashboard] (button)
Moreover, returning to the toolbar button leads me to the domain administration site, which allows neither to deploy nor to deploy:
https://admin.google.com/mydomain.com/
By the way, the application extension console never accesses the redirect page I created and never reads the gadget specification on my site (never used Google, as promised), so the error message should indicate manifest.xml does not use OAuth 2.0 ... or the Apps Extensions Console doesnβt use it itself and blames me for it!
So, the Gmail contextual application:
- Outdated?
- Impossible now?
- Authorized with OAuth 2.0? How?