File tree Expand file tree Collapse file tree
examples/demo-app/src/cloud-providers/carto Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,10 +33,14 @@ export default class CartoProvider extends Provider {
3333 this . _folderLink = `https://{user}.${ DOMAIN } /dashboard/maps/external` ;
3434
3535 // Initialize CARTO API
36+ // NOTE: `clientID` is intentionally omitted from the constructor options.
37+ // OAuthApp's constructor calls `initOauth` (which sets `this._oauth`) only when
38+ // `oauthOptions.clientID` is truthy. `setClientID` below throws
39+ // 'Cannot set the client ID more than once' if `_oauth` is already set, so the
40+ // client ID must be passed via `setClientID` only — not via the constructor.
3641 this . _carto = new OAuthApp (
3742 {
3843 authorization : `https://${ DOMAIN } /oauth2` ,
39- clientID : clientId ,
4044 // eslint-disable-next-line @typescript-eslint/no-explicit-any
4145 scopes : 'schemas:c datasets:rw:*' as any
4246 } as any ,
You can’t perform that action at this time.
0 commit comments