NewPath-Consulting/warm

Implement the getAuthType() approach to configuring the APIKEY for Wild Apricot authentication

Opened this issue · 1 comments

Google has delisted our public Data Connector from the library of 3rd party connectors for the following reason:

Use appropriate authentication methods in getAuthType(). Do not request credentials via getConfig(). Please mention the "API Key" in the getAuthType() method.

There is some background on Stackoverflow on this.

Google has stopped allowing connector developers to collect API keys as a configuration parameter of the connector configration. We are currently doing that using getConfig(), which is a no-no.

The alternative new way is to use the getAuthType() approach which prompts for an API key to be collected during the configuration flow. But this means we will have to change any reference to configParams.apikey to use the new approach.

There are 4 functions that work to get authentication getAuthType, resetAuth(), isAuthValid() and the setCredentials()
https://developers.google.com/datastudio/connector/auth#getauthtype

We are validating the API key configured through getConfig() in line 345, 397, 511, 528, 583, and this needs to be changed to support this new approach. Once this is done we can republish the plugin. The getConfig() approach is in lines 31-51 and will need to be removed and replaced.

A note: using this approach we could probably not only check the API key but also check the License key. Issue #31 describes how that would work.