Reputation: 41
I've been up and down the Google Data Studio Community Connector docs, as well as many open source examples. I've watched the videos numerous times, and read thoroughly.
https://developers.google.com/datastudio/connector/auth?hl=en
My prototype works with .setAuthType(AuthTypes.NONE) - no authorization needed.
However, when I set the authorization scheme to API KEY
.setAuthType(cc.AuthType.KEY)
(which, by the way - requires the checkForValidKey function - which I have added)...
-- my understanding is that the user will be prompted for a key on the first screen of the connector configuration AUTOMATICALLY... However, this is not happening.
The call defined in checkForValidKey IS happening. When I trap it, it shows "null" for the TOKEN value (which is the key)...
What am I missing? Do I need to trigger the interface somehow? Been at this for too many hours. Any help would be greatly appreciated.
Upvotes: 4
Views: 488
Reputation: 3168
The user will be prompted for credentials if your isAuthValid()
returns false
and getAuthType
returns a value other than NONE
. See the Authorization guide for examples.
Upvotes: 5