diff --git a/packages/server/modules/auth/defaultApps.ts b/packages/server/modules/auth/defaultApps.ts index b8a8748ad..9e7c9b9c4 100644 --- a/packages/server/modules/auth/defaultApps.ts +++ b/packages/server/modules/auth/defaultApps.ts @@ -12,6 +12,7 @@ export enum DefaultAppIds { Explorer = 'explorer', DesktopManager = 'sdm', Connector = 'sca', + SpeckleDesktopAuthService = 'sdas', Excel = 'spklexcel', PowerBI = 'spklpwerbi', Automate = 'spklautoma' @@ -77,6 +78,26 @@ const SpeckleConnectorApp = { ] } +/** Next gen connectors */ +const SpeckleDesktopAuthService = { + id: DefaultAppIds.SpeckleDesktopAuthService, + secret: DefaultAppIds.SpeckleDesktopAuthService, + name: 'Speckle Connector', + description: + 'Speckle desktop authentication service. This application helps link your Speckle account with all host application connectors, like Revit, Rhino etc.', + trustByDefault: true, + public: true, + redirectUrl: 'http://localhost:29364', + scopes: [ + Scopes.Streams.Read, + Scopes.Streams.Write, + Scopes.Profile.Read, + Scopes.Profile.Email, + Scopes.Users.Read, + Scopes.Users.Invite + ] +} + const SpeckleExcel = { id: DefaultAppIds.Excel, secret: DefaultAppIds.Excel, @@ -140,6 +161,7 @@ const defaultApps = [ SpeckleApiExplorer, SpeckleDesktopApp, SpeckleConnectorApp, + SpeckleDesktopAuthService, SpeckleExcel, SpecklePowerBi, SpeckleAutomate diff --git a/packages/server/modules/auth/tests/apps.graphql.spec.js b/packages/server/modules/auth/tests/apps.graphql.spec.js index 4e90f06f8..5f03b216d 100644 --- a/packages/server/modules/auth/tests/apps.graphql.spec.js +++ b/packages/server/modules/auth/tests/apps.graphql.spec.js @@ -232,7 +232,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(8) + expect(res.body.data.apps.length).to.equal(9) }) it('Should get app info without secret if not authenticated and owner', async () => { diff --git a/packages/server/modules/auth/tests/apps.spec.js b/packages/server/modules/auth/tests/apps.spec.js index 47b583ab6..2d25a612d 100644 --- a/packages/server/modules/auth/tests/apps.spec.js +++ b/packages/server/modules/auth/tests/apps.spec.js @@ -189,7 +189,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(8) + expect(apps.length).to.equal(9) }) it('Should fail to register an app with no scopes', async () => {