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

冷暖自知 提交于 2020-07-09 11:47:41

问题


Is it possible to authenticate to third-party service in G-Suite (Gmail) Add-ons, but without oAuth. The service I want to authenticate works on REST API and has no oAuth support.

The best for me would be to open a new window (as with oAuth), login there and return token to the Gmail add-on frame. If that won't be possible, I'd go with giving a username and password in dedicated Card in add-on, but I'm not sure it that solution will pass Google verification when publishing in Marketplace.

I'll be grateful for all the suggestions.


回答1:


Unfortunately no. When connecting your add-on to third party services(ex. your application server), Gmail forces you to set up a separate authentication process for user to go through to use your services.

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).

Your service can still use Google OAuth to authenticate the user, you just need to set it up separately from your Gmail add-on.

You can read more on it here: https://developers.google.com/gmail/add-ons/how-tos/non-google-services

Also in my post I explain the process of connecting your non-google services to gmail add-on in more detail



来源:https://stackoverflow.com/questions/52000806/gmail-add-on-connecting-to-non-google-services-without-oauth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!