Gmail 附加组件连接到非 Google 服务,无需 oAuth

Gmail add-on connecting to non-Google Services without oAuth

是否可以在 G-Suite (Gmail) 加载项中向第三方服务进行身份验证,但没有 oAuth。我要验证的服务适用于 REST API,并且不支持 oAuth。

对我来说最好的办法是打开一个新的 window(与 oAuth 一样),在那里登录并 return 令牌到 Gmail 附加框架。如果那不可能,我会在附加组件的专用卡中提供用户名和密码,但我不确定该解决方案在 Marketplace 中发布时是否会通过 Google 验证。

对于所有建议,我将不胜感激。

很遗憾没有。将您的附加组件连接到第三方服务(例如您的应用程序服务器)时,Gmail 会强制您为用户设置单独的身份验证过程才能使用您的服务。

However, if the non-Google service does require authorization, you'll have to configure OAuth for that service. You can make this process easier by using the OAuth2 for Apps Script library (there is also an OAuth1 version).

您的服务仍然可以使用 Google OAuth 来验证用户,您只需要将其与 Gmail 插件分开设置即可。

您可以在这里阅读更多内容:https://developers.google.com/gmail/add-ons/how-tos/non-google-services

另外,在 my post 中,我更详细地解释了将非 google 服务连接到 gmail 附加组件的过程