Gmail

This describes the SASL XOAUTH2 Mechanism used by gmail to access to mailbox. Authenticate with Oauth 2.0 Then use the Bearer to initialize SMTP/IMAP operations

The url for the request credentials popup

https://accounts.google.com/o/oauth2/v2/auth?
  scope=https://mail.google.com/&
  access_type=offline&
  include_granted_scopes=true&
  state=state_parameter_passthrough_value&
  redirect_uri=<caliopen instance/api/v2/oauth/google/callback>
  response_type=code&
  client_id=<client_id>

How to configure the gmail protocol

More information on https://developers.google.com/identity/protocols/OAuth2UserAgent