From 3ddb92f88d0750b7c5bedbcc4feb7e10c6f6c9c5 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Tue, 18 Feb 2025 10:50:43 +0000 Subject: [PATCH 1/3] feat: adds a first party app for the desktop auth service --- packages/server/modules/auth/defaultApps.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/server/modules/auth/defaultApps.ts b/packages/server/modules/auth/defaultApps.ts index b8a8748ad..c7cb33b2e 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,25 @@ const SpeckleConnectorApp = { ] } +/** Next gen connectors */ +const SpeckleDesktopAuthService = { + id: DefaultAppIds.SpeckleDesktopAuthService, + secret: DefaultAppIds.SpeckleDesktopAuthService, + name: 'Speckle Connector', + description: 'Speckle host application conntectors.', + 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 +160,7 @@ const defaultApps = [ SpeckleApiExplorer, SpeckleDesktopApp, SpeckleConnectorApp, + SpeckleDesktopAuthService, SpeckleExcel, SpecklePowerBi, SpeckleAutomate From 0530e4313ba43e08e6e983c2ccd47b429e59b5c9 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Tue, 18 Feb 2025 10:57:08 +0000 Subject: [PATCH 2/3] feat: nicer end user description --- packages/server/modules/auth/defaultApps.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/modules/auth/defaultApps.ts b/packages/server/modules/auth/defaultApps.ts index c7cb33b2e..9e7c9b9c4 100644 --- a/packages/server/modules/auth/defaultApps.ts +++ b/packages/server/modules/auth/defaultApps.ts @@ -83,7 +83,8 @@ const SpeckleDesktopAuthService = { id: DefaultAppIds.SpeckleDesktopAuthService, secret: DefaultAppIds.SpeckleDesktopAuthService, name: 'Speckle Connector', - description: 'Speckle host application conntectors.', + 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', From c37bf28a0ef0a61eb8652e84dcfff77837de25bc Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Tue, 18 Feb 2025 11:39:53 +0000 Subject: [PATCH 3/3] tests: fixes tests for the new reality --- packages/server/modules/auth/tests/apps.graphql.spec.js | 2 +- packages/server/modules/auth/tests/apps.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 () => {