This depends on what you’re using gmail for.
I’m assuming you’re using it for sending emails from an email address per client that they configure.
It looks like you could go down a couple routes for this.
- Email over OAuth2: Despite google phasing out less secure apps, they google has modified their imap, pop, and smtp servers to use OAuth authentication using xoauth2-protocol. Google recommends to use the javamail library which has built in OAuth2 as specified by google. Moqui is currently using Apache Commons mail which does not support OAuth2 authentication. The oauth2 mechanism for this could be done well with a bit of effort assuming the libraries behave. This could even be pushed upstream for supporting email over OAuth2.
- The alternative option is Email over REST API. Depending on the requirements of the application, if only a small amount of the APIs are needed, then google would prefer this approach to limit the scope of the application (you can find scopes here). You should be able to autheticate with OAuth2 using the moqui-sso component. After authenticating with OAuth2 to the google account with your application, you would send a HTTP Post to the user.messages.send endpoint. This might be simpler overall, and setting up the infrastructure here could allow for Moqui calling other google api endpoints.
There’s some thoughts. Hopefully that helps!