diff --git a/packages/server/modules/auth/defaultApps.ts b/packages/server/modules/auth/defaultApps.ts index ca28a28c0..de3271a87 100644 --- a/packages/server/modules/auth/defaultApps.ts +++ b/packages/server/modules/auth/defaultApps.ts @@ -21,7 +21,8 @@ export enum DefaultAppIds { SpeckleConnectorsDUI = 'sdui', Excel = 'spklexcel', PowerBI = 'spklpwerbi', - Automate = 'spklautoma' + Automate = 'spklautoma', + ConnectorsV3 = 'connectrV3' } const SpeckleWebApp = { @@ -86,6 +87,25 @@ const SpeckleConnectorsDUI = { ] } +const SpeckleConnectorsV3 = { + id: DefaultAppIds.ConnectorsV3, + secret: DefaultAppIds.ConnectorsV3, + name: 'Desktop Connectors', + description: 'Speckle V3 connectors..', + trustByDefault: false, // NOTE: we do not wanna automatically authenticate in DUI because it uses cached account before which we wanna switch account. trustByDefault: true skips this step + public: true, + redirectUrl: 'http://localhost:29355', + scopes: [ + Scopes.Streams.Read, + Scopes.Streams.Write, + Scopes.Profile.Read, + Scopes.Profile.Email, + Scopes.Users.Read, + Scopes.Users.Invite, + ...workspaceScopes + ] +} + const SpeckleConnectorApp = { id: DefaultAppIds.Connector, secret: DefaultAppIds.Connector, @@ -193,7 +213,8 @@ const defaultApps = [ SpeckleDesktopAuthService, SpeckleExcel, SpecklePowerBi, - SpeckleAutomate + SpeckleAutomate, + SpeckleConnectorsV3 ] export function getDefaultApps() { diff --git a/packages/server/modules/auth/tests/apps.graphql.spec.ts b/packages/server/modules/auth/tests/apps.graphql.spec.ts index 6e1005205..80bb626ee 100644 --- a/packages/server/modules/auth/tests/apps.graphql.spec.ts +++ b/packages/server/modules/auth/tests/apps.graphql.spec.ts @@ -170,7 +170,7 @@ describe('GraphQL @apps-api', () => { expect(res).to.be.json expect(res.body.errors).to.not.exist expect(res.body.data.apps).to.be.an('array') - expect(res.body.data.apps.length).to.equal(10) + expect(res.body.data.apps.length).to.equal(11) }) it('Should get app info without secret if not authenticated and owner', async () => { diff --git a/packages/server/modules/auth/tests/apps.spec.ts b/packages/server/modules/auth/tests/apps.spec.ts index 9a1defa2a..2db4d2958 100644 --- a/packages/server/modules/auth/tests/apps.spec.ts +++ b/packages/server/modules/auth/tests/apps.spec.ts @@ -139,7 +139,7 @@ describe('Services @apps-services', () => { it('Should get all the public apps on this server', async () => { const apps = await getAllPublicApps() expect(apps).to.be.an('array') - expect(apps.length).to.equal(10) + expect(apps.length).to.equal(11) }) it('Should fail to register an app with no scopes', async () => {